aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-01-14 21:46:57 +0000
committerDevang Patel <dpatel@apple.com>2010-01-14 21:46:57 +0000
commitaa97d7051ed3517c7b64787bcb65ae04e1a52594 (patch)
tree8d3bb23e61435503de164faf10c71cbc81e29bbf /lib/CodeGen/CGDebugInfo.cpp
parent79bff4350e751aaabeb8f28c2b9ca8d05649bb3d (diff)
Emit linkage name even if it matches regular name. The code generator uses linkage name to find subprogram entry for the current function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93461 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 6cfe503d3c..ab8f6637d6 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -1001,10 +1001,10 @@ void CGDebugInfo::EmitFunctionStart(GlobalDecl GD, QualType FnType,
const Decl *D = GD.getDecl();
if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
Name = getFunctionName(FD);
+ if (Name[0] == '\01')
+ Name = Name.substr(1);
// Use mangled name as linkage name for c/c++ functions.
- llvm::StringRef MangledName(CGM.getMangledName(GD));
- if (!Name.equals(MangledName))
- LinkageName = MangledName;
+ LinkageName = CGM.getMangledName(GD);
} else {
// Use llvm function name as linkage name.
Name = Fn->getName();