diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-04-07 05:48:37 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-04-07 05:48:37 +0000 |
commit | 15894b791bb5c0319cdc8665816266c256674625 (patch) | |
tree | 132ab34e9ab645c2c15ef655cf248867f322b300 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 25db1f3ff11dd866120582072b48c2b8d6f5a614 (diff) | |
download | bcm5719-llvm-15894b791bb5c0319cdc8665816266c256674625.tar.gz bcm5719-llvm-15894b791bb5c0319cdc8665816266c256674625.zip |
Various fixes to symbols used for Obj-C x86_64 metadata.
- Changed method names to match gcc (categories names still aren't
mangled in).
- Expose correct name for class and metadata symbols (although
-fvisibility=hidden isn't yet correct).
- Remove several things from llvm.used that didn't need to be there
(I suspect this can still be trimmed).
- Don't use asm-prefix extension for _objc_empty_{cache,vtable} (not
needed).
- Hide EH type class info with -fvisibility=hidden
- Change setGlobal[Option]Visibility to not change the visibility of
functions with internal linkage.
llvm-svn: 68510
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 379ff9b4240..1dd2c4d67f0 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -99,6 +99,10 @@ void CodeGenModule::ErrorUnsupported(const Decl *D, const char *Type, /// GlobalValue according to the given clang AST visibility value. static void setGlobalVisibility(llvm::GlobalValue *GV, VisibilityAttr::VisibilityTypes Vis) { + // Do not change the visibility of internal definitions. + if (GV->hasInternalLinkage()) + return; + switch (Vis) { default: assert(0 && "Unknown visibility!"); case VisibilityAttr::DefaultVisibility: @@ -115,6 +119,10 @@ static void setGlobalVisibility(llvm::GlobalValue *GV, static void setGlobalOptionVisibility(llvm::GlobalValue *GV, LangOptions::VisibilityMode Vis) { + // Do not change the visibility of internal definitions. + if (GV->hasInternalLinkage()) + return; + switch (Vis) { default: assert(0 && "Unknown visibility!"); case LangOptions::NonVisibility: |