[cfe-commits] r93461 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Devang Patel
dpatel at apple.com
Thu Jan 14 13:46:57 PST 2010
Author: dpatel
Date: Thu Jan 14 15:46:57 2010
New Revision: 93461
URL: http://llvm.org/viewvc/llvm-project?rev=93461&view=rev
Log:
Emit linkage name even if it matches regular name. The code generator uses linkage name to find subprogram entry for the current function.
Modified:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=93461&r1=93460&r2=93461&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Thu Jan 14 15:46:57 2010
@@ -1001,10 +1001,10 @@
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();
More information about the cfe-commits
mailing list