https://llvm.org/bugs/show_bug.cgi?id=24291
Bug ID: 24291
Summary: clang-cl doesn't respect noinline on methods of
dllimported classes
Product: clang
Version: trunk
Hardware: PC
URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1188045
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Classification: Unclassified
See the Mozilla bug, specifically this test case from
https://bugzilla.mozilla.org/show_bug.cgi?id=1188045#c5:
$ cat test.cpp
class __declspec(dllimport) Test
{
public:
void Hello();
__declspec(noinline) static Test* Instance()
{
static Test singleton;
return &singleton;
}
};
int main()
{
Test::Instance()->Hello();
return 0;
}
$ (cl -nologo -c -O2 test.cpp && dumpbin -all test.obj) | grep singleton
$ (clang-cl -nologo -c -O2 test.cpp && dumpbin -all test.obj) | grep singleton
00000002 DIR32 00000000 A
__imp_?singleton@?1??I
nstance@Test@@SAPAV2@XZ@4V2@A (__declspec(dllimport) class Test `public: static
class Test * __cdecl Test::Instance(void)'::`2'::singleton)
00A 00000000 UNDEF notype External |
__imp_?singleton@?1??Instance@Te
st@@SAPAV2@XZ@4V2@A (__declspec(dllimport) class Test `public: static class
Test
* __cdecl Test::Instance(void)'::`2'::singleton)
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs