[LLVMbugs] [Bug 24291] New: clang-cl doesn't respect noinline on methods of dllimported classes
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Jul 28 12:05:38 PDT 2015
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: unassignedclangbugs at nondot.org
Reporter: ehsan at mozilla.com
CC: david.majnemer at gmail.com, hans at chromium.org,
llvmbugs at cs.uiuc.edu, rnk at google.com
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 at Test@@SAPAV2 at XZ@4V2 at A (__declspec(dllimport) class Test `public: static
class Test * __cdecl Test::Instance(void)'::`2'::singleton)
00A 00000000 UNDEF notype External |
__imp_?singleton@?1??Instance at Te
st@@SAPAV2 at XZ@4V2 at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150728/b818132a/attachment.html>
More information about the llvm-bugs
mailing list