diff options
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
| -rw-r--r-- | lib/CodeGen/CGExpr.cpp | 6 |
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); |
