https://llvm.org/bugs/show_bug.cgi?id=24291
Ehsan Akhgari [:ehsan] <eh...@mozilla.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|WORKSFORME |--- Summary|clang-cl doesn't respect |clang-cl imports an |noinline on methods of |incorrect data symbol for |dllimported classes |dllimported classes inside | |a namespace with a default | |ctor which have a local | |static member --- Comment #8 from Ehsan Akhgari [:ehsan] <eh...@mozilla.com> --- It turns out that the test case in comment 0 was completely wrong, sorry for the red herring. Here is a minimized test case that demonstrates the difference between cl and clang-cl: $ cat test.cpp namespace foo { class __declspec(dllimport) S { public: static S* Instance() { static S s; return &s; } S() {} }; } void use() { foo::S::Instance(); } $ clang-cl -c -O1 test.cpp && llvm-nm test.obj 00000000 T ?use@@YAXXZ 00000001 a @feat.00 U __imp_??_B?1??Instance@S@foo@@SAPAV12@XZ@51 $ cl -nologo -c -O1 test.cpp && llvm-nm test.obj test.cpp 00000000 T ?use@@YAXXZ 00e1797d a @comp.id 80000191 a @feat.00 U __imp_?Instance@S@foo@@SAPAV12@XZ Note that if you drop the default ctor from S, or move S to the global namespace, the bug goes away! -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs