[LLVMbugs] [Bug 7353] New: Undefined symbol '__ZNSbIcED1Ev' when using extern templates and -fvisibility-hidden

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jun 11 03:42:24 CDT 2010


http://llvm.org/bugs/show_bug.cgi?id=7353

           Summary: Undefined symbol '__ZNSbIcED1Ev' when using extern
                    templates and -fvisibility-hidden
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: nicolasweber at gmx.de
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Reduced testcase (this was a 500k file, hooray for delta):

$ cat file.pp.mm
namespace std {
  template<typename T> class basic_string {
    public:
      ~basic_string() {}
  };
  extern template class basic_string<char>;
}
std::basic_string<char> kEmptyString;

$ /Users/thakis/src/llvm/Release/bin/clang++ -fvisibility=hidden -c file.pp.mm
fatal error: error in backend: symbol '__ZNSbIcED1Ev' can not be undefined in a
subtraction expression

The message is written by llvm/lib/MC/MachObjectWriter.cpp

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the LLVMbugs mailing list