diff options
author | Devang Patel <dpatel@apple.com> | 2010-01-14 21:46:57 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-01-14 21:46:57 +0000 |
commit | 2d63010a9c64536ad27d982151f0de8ad7ce843b (patch) | |
tree | fb4499a6ff745a321ee27d56870c366d71dba98f /clang/lib/CodeGen/CGDebugInfo.cpp | |
parent | 9ae81816bc09cd935d6b26214d9716a93a37b657 (diff) | |
download | bcm5719-llvm-2d63010a9c64536ad27d982151f0de8ad7ce843b.tar.gz bcm5719-llvm-2d63010a9c64536ad27d982151f0de8ad7ce843b.zip |
Emit linkage name even if it matches regular name. The code generator uses linkage name to find subprogram entry for the current function.
llvm-svn: 93461
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 6cfe503d3c8..ab8f6637d6c 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/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(); |