mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
For dwarf4 use the correct form for referencing debug_loc locations,
and update test cases accordingly. This doesn't affect the output dumped using llvm-dwarfdump, but readelf does now dump the debug_loc section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194898 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1772,7 +1772,9 @@ DIE *CompileUnit::constructVariableDIE(DbgVariable &DV, bool isScopeAbstract) {
|
||||
|
||||
unsigned Offset = DV.getDotDebugLocOffset();
|
||||
if (Offset != ~0U) {
|
||||
addLabel(VariableDie, dwarf::DW_AT_location, dwarf::DW_FORM_data4,
|
||||
addLabel(VariableDie, dwarf::DW_AT_location,
|
||||
DD->getDwarfVersion() >= 4 ? dwarf::DW_FORM_sec_offset
|
||||
: dwarf::DW_FORM_data4,
|
||||
Asm->GetTempSymbol("debug_loc", Offset));
|
||||
DV.setDIE(VariableDie);
|
||||
return VariableDie;
|
||||
|
Reference in New Issue
Block a user