mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Fix .debug_range for linux. Patch by Krister Wombell.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112830 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -3130,10 +3130,17 @@ void DwarfDebug::emitDIE(DIE *Die) {
|
||||
case dwarf::DW_AT_ranges: {
|
||||
// DW_AT_range Value encodes offset in debug_range section.
|
||||
DIEInteger *V = cast<DIEInteger>(Values[i]);
|
||||
Asm->EmitLabelOffsetDifference(DwarfDebugRangeSectionSym,
|
||||
V->getValue(),
|
||||
DwarfDebugRangeSectionSym,
|
||||
4);
|
||||
|
||||
if (Asm->MAI->doesDwarfUsesLabelOffsetForRanges()) {
|
||||
Asm->EmitLabelPlusOffset(DwarfDebugRangeSectionSym,
|
||||
V->getValue(),
|
||||
4);
|
||||
} else {
|
||||
Asm->EmitLabelOffsetDifference(DwarfDebugRangeSectionSym,
|
||||
V->getValue(),
|
||||
DwarfDebugRangeSectionSym,
|
||||
4);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case dwarf::DW_AT_location: {
|
||||
|
Reference in New Issue
Block a user