[cfe-commits] r84102 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Sanjiv Gupta
sanjiv.gupta at microchip.com
Wed Oct 14 08:08:34 PDT 2009
Author: sgupta
Date: Wed Oct 14 10:08:34 2009
New Revision: 84102
URL: http://llvm.org/viewvc/llvm-project?rev=84102&view=rev
Log:
Few targets like PIC16 mangle the names of global variables, so retrieve the name
from Var itself rather than the decl for DebugInfo metadata.
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=84102&r1=84101&r2=84102&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Wed Oct 14 10:08:34 2009
@@ -1350,7 +1350,7 @@
PresumedLoc PLoc = SM.getPresumedLoc(Decl->getLocation());
unsigned LineNo = PLoc.isInvalid() ? 0 : PLoc.getLine();
- std::string Name = Decl->getNameAsString();
+ std::string Name = Var->getName();
QualType T = Decl->getType();
if (T->isIncompleteArrayType()) {
More information about the cfe-commits
mailing list