mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-28 22:24:28 +00:00
Set address while constructing DIE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83343 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1107,6 +1107,14 @@ DIE *DwarfDebug::CreateGlobalVariableDIE(CompileUnit *DW_Unit,
|
|||||||
if (!GV.isLocalToUnit())
|
if (!GV.isLocalToUnit())
|
||||||
AddUInt(GVDie, dwarf::DW_AT_external, dwarf::DW_FORM_flag, 1);
|
AddUInt(GVDie, dwarf::DW_AT_external, dwarf::DW_FORM_flag, 1);
|
||||||
AddSourceLine(GVDie, &GV);
|
AddSourceLine(GVDie, &GV);
|
||||||
|
|
||||||
|
// Add address.
|
||||||
|
DIEBlock *Block = new DIEBlock();
|
||||||
|
AddUInt(Block, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_addr);
|
||||||
|
AddObjectLabel(Block, 0, dwarf::DW_FORM_udata,
|
||||||
|
Asm->Mang->getMangledName(GV.getGlobal()));
|
||||||
|
AddBlock(GVDie, dwarf::DW_AT_location, 0, Block);
|
||||||
|
|
||||||
return GVDie;
|
return GVDie;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1582,13 +1590,6 @@ void DwarfDebug::ConstructGlobalVariableDIE(MDNode *N) {
|
|||||||
|
|
||||||
DIE *VariableDie = CreateGlobalVariableDIE(ModuleCU, DI_GV);
|
DIE *VariableDie = CreateGlobalVariableDIE(ModuleCU, DI_GV);
|
||||||
|
|
||||||
// Add address.
|
|
||||||
DIEBlock *Block = new DIEBlock();
|
|
||||||
AddUInt(Block, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_addr);
|
|
||||||
AddObjectLabel(Block, 0, dwarf::DW_FORM_udata,
|
|
||||||
Asm->Mang->getMangledName(DI_GV.getGlobal()));
|
|
||||||
AddBlock(VariableDie, dwarf::DW_AT_location, 0, Block);
|
|
||||||
|
|
||||||
// Add to map.
|
// Add to map.
|
||||||
Slot = VariableDie;
|
Slot = VariableDie;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user