summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2009-10-14 15:08:34 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2009-10-14 15:08:34 +0000
commit84a02874970fcdfe44c45c6525f05d19a72de6c1 (patch)
tree9b1a7a7487ec24158ea6c2f7e362163ee30c3bc9 /clang
parent184edcadbd618e4fd6224c9bceff3e3aeb6346cc (diff)
downloadbcm5719-llvm-84a02874970fcdfe44c45c6525f05d19a72de6c1.tar.gz
bcm5719-llvm-84a02874970fcdfe44c45c6525f05d19a72de6c1.zip
Few targets like PIC16 mangle the names of global variables, so retrieve the name
from Var itself rather than the decl for DebugInfo metadata. llvm-svn: 84102
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index bbe113b9312..4c624205b4c 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1350,7 +1350,7 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var,
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()) {
OpenPOWER on IntegriCloud