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
This commit is contained in:
Sanjiv Gupta 2009-10-14 15:08:34 +00:00
parent 184edcadbd
commit 84a0287497
1 changed files with 1 additions and 1 deletions

View File

@ -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()) {