[LLVMbugs] [Bug 8457] New: clang++ emits hidden symbols instead of extern.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Oct 25 08:39:54 PDT 2010


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

           Summary: clang++ emits hidden symbols instead of extern.
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: devlists at shadowlab.org
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


When using the -fvisibility=hidden flag, clang tag structs as hidden (even if
declared in extern "C" block) and propagate this visibility to the functions
that use them as arguments, even is they are declared explicitly extern.

--------------- Foo.cpp ------------------
struct AudioTimeStamp { int field; };
void  __attribute__((visibility("default"))) Foo(struct AudioTimeStamp
*timeStamp) { }
----------------------------------------

clang++ -S -emit-llvm -fvisibility=hidden Foo.cpp

--------------- Foo.s ------------------
…
define hidden void @_Z3FooP14AudioTimeStamp(%struct.AudioTimeStamp* %timeStamp)
nounwind ssp {
…
----------------------------------------

If compiled in C mode or with GCC, the Foo symbol is properly exported.

-- 
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 llvm-bugs mailing list