diff options
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 92e87826a25..fe436270061 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/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); |