Global name regression.
authorJim Laskey <jlaskey@mac.com>
Mon, 16 Oct 2006 19:38:41 +0000 (19:38 +0000)
committerJim Laskey <jlaskey@mac.com>
Mon, 16 Oct 2006 19:38:41 +0000 (19:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30982 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/DwarfWriter.cpp

index 9065607ca5e7f1b11cc8ca72702daaae7fec7737..8fe8b4e76273aa41c48c208ba8d67143ff581295 100644 (file)
@@ -1632,11 +1632,15 @@ DIE *DwarfWriter::NewGlobalVariable(GlobalVariableDesc *GVD) {
   
   // Add source line info if available.
   AddSourceLine(VariableDie, UnitDesc, GVD->getLine());
+  
+  // Work up linkage name.
+  std::string LinkageName(TAI->getGlobalPrefix());
+  LinkageName += GV->getName();
 
   // Add address.
   DIEBlock *Block = new DIEBlock();
   Block->AddUInt(DW_FORM_data1, DW_OP_addr);
-  Block->AddObjectLabel(DW_FORM_udata, MangledName);
+  Block->AddObjectLabel(DW_FORM_udata, LinkageName);
   Block->ComputeSize(*this);
   VariableDie->AddBlock(DW_AT_location,  0, Block);