https://llvm.org/bugs/show_bug.cgi?id=26936
Bug ID: 26936 Summary: [ms][dll] clang generates a COFF symbol table that differs from msvc with __declspec(dllimport) Product: clang Version: trunk Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: C++ Assignee: unassignedclangb...@nondot.org Reporter: andrey.kules...@intel.com CC: dgre...@apple.com, llvm-bugs@lists.llvm.org Classification: Unclassified !- Clang is not adding template functions with __declspec(dllimport) to the COFF symbol table, this behavior differs from a behavior of msvc -! =========Environment============= OS: Win Lang: c++ Version: trunk =========Reproducer============== test.cpp ----------- template<class _E> struct basic_string { void func(int npos); static const int npos; }; template<class _E> const int basic_string<_E>::npos = -1; typedef basic_string<char> string; string s; int main() { s.func(basic_string<char>::npos); return 0; } template <class T> basic_string<T> foo() { return s; } template class __declspec(dllimport) basic_string<char> foo(); ----------- $ cl -c test.cpp /Fomstest.obj $ clang-cl -c test.cpp /Foclangtest.obj ===========Output================ >>> MSVC (vs2015): $ dumpbin /symbols mstest.obj | grep -i dllimport | cut -f2 -d"|" __imp_?func@?$basic_string@D@@QEAAXH@Z (__declspec(dllimport) public: void __cdecl basic_string<char>::func(int)) >>> clang: $ dumpbin /symbols clangtest.obj | grep -i dllimport | cut -f2 -d"|" <empty output> Andrey Kuleshov ====== Software Engineer Intel Compiler Team -- 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