aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-09-12 23:06:21 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-09-12 23:06:21 +0000
commit0a23d76999f838257f70bd43dc7f1e2242147609 (patch)
treec83e7eac546141827b3417f69c7ddaa0e6fb8c07 /lib/CodeGen
parent2f60af7dd45f8d8af99a96756a43a46e05f70978 (diff)
Don't use the PredefinedExpr string as the global variable name, these don't
make very nice symbols, just use the function name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81653 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CGExpr.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index 92e87826a2..fe43627006 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -841,11 +841,15 @@ LValue CodeGenFunction::EmitPredefinedFunctionName(unsigned Type) {
break;
}
+ llvm::StringRef FnName = CurFn->getName();
+ if (FnName.startswith("\01"))
+ FnName = FnName.substr(1);
+ GlobalVarName += FnName;
+
std::string FunctionName =
PredefinedExpr::ComputeName(getContext(), (PredefinedExpr::IdentType)Type,
CurCodeDecl);
- GlobalVarName += FunctionName;
llvm::Constant *C =
CGM.GetAddrOfConstantCString(FunctionName, GlobalVarName.c_str());
return LValue::MakeAddr(C, 0);