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

           Summary: Clang differs from GCC in how it deals with vtables in
                    combination with limited symbol visibility, causing
                    link errors
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


It seems as Clang differs from GCC in how it deals with vtables in combination
with limited symbol visibility, causing link errors. The following test case
exhibits the issue:

http://gist.github.com/584533

The template class has one exported member function, which is implicitly
instantiated for <Foo> in foo.cpp. The class itself is not exported.

GCC will in this case not include a vtable for TemplateClass<Foo> in the shared
library, and the vtable is generated when building the client application.

For Clang the vtable is included in the shared library, but it's not exported,
so when building the client application a vtable is not generated, and you'll
get an error when linking that the vtable for TemplateClass<Foo> is missing.

-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to