summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-04-07 05:48:37 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-04-07 05:48:37 +0000
commit6ab187a49a42de6d351248d8a6e0206e39743a0c (patch)
tree44027c735e9456ba159c9527eea6327716308d2a /lib/CodeGen/CGExpr.cpp
parente82e13ad4ee707d71e320946887f47f45b303e07 (diff)
downloadclang-6ab187a49a42de6d351248d8a6e0206e39743a0c.tar.gz
clang-6ab187a49a42de6d351248d8a6e0206e39743a0c.tar.bz2
clang-6ab187a49a42de6d351248d8a6e0206e39743a0c.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68510 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r--lib/CodeGen/CGExpr.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index 7f3645556b..e62bf2f3fc 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -753,8 +753,11 @@ LValue CodeGenFunction::EmitPredefinedFunctionName(unsigned Type) {
if(const FunctionDecl *FD = dyn_cast<FunctionDecl>(CurFuncDecl)) {
FunctionName = CGM.getMangledName(FD);
} else {
- // Just get the mangled name.
+ // Just get the mangled name; skipping the asm prefix if it
+ // exists.
FunctionName = CurFn->getName();
+ if (FunctionName[0] == '\01')
+ FunctionName = FunctionName.substr(1, std::string::npos);
}
GlobalVarName += FunctionName;