From 2d7bc3e59517bf42ae855669c55844d868f4b21a Mon Sep 17 00:00:00 2001 From: Sanjiv Gupta Date: Wed, 14 Oct 2009 15:08:34 +0000 Subject: 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 --- lib/CodeGen/CGDebugInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/CodeGen/CGDebugInfo.cpp') 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()) { -- cgit v1.2.3