https://llvm.org/bugs/show_bug.cgi?id=26498
Bug ID: 26498 Summary: Extern template function not emitted available_externally while class methods are Product: new-bugs Version: trunk Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: new bugs Assignee: unassignedb...@nondot.org Reporter: mehdi.am...@apple.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Considering this code: template <class F> F foo() { return 1; } template <class F> struct S { F foo() { return 1; } }; extern template int foo<int>(); extern template struct S<int>; int bar() { return foo<int>() + S<int>().foo(); } Compiled with: clang++ -O2 -mllvm -disable-llvm-optzns -S -emit-llvm -o - | grep foo We can see: %2 = call i32 @_Z3fooIiET_v() %3 = call i32 @_ZN1SIiE3fooEv(%struct.S* %1) declare i32 @_Z3fooIiET_v() #1 define available_externally i32 @_ZN1SIiE3fooEv(%struct.S* %this) #2 align 2 { I'm not sure why the extern template class method is emitted available_externally while the free function is not. -- 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