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