summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
-rw-r--r--clang/lib/CodeGen/CGExpr.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index 7f3645556be..e62bf2f3fce 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud