aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
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
commit2d7bc3e59517bf42ae855669c55844d868f4b21a (patch)
tree8e271418002f8edd28e5e316c6daa28add537014 /lib/CodeGen/CGDebugInfo.cpp
parent1219d150aff23d19ba988e12602db5f3b70e404d (diff)
Few targets like PIC16 mangle the names of global variables, so retrieve the name
from Var itself rather than the decl for DebugInfo metadata. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84102 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index bbe113b931..4c624205b4 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/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()) {