llvm.org GIT mirror llvm / f7952d3
DebugInfo: Restrict DW_AT_high_pc encoding as data4 offset to DWARF 4 as per spec Code review feedback to r203187 from Oliver Stannard. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203256 91177308-0d34-0410-b5e6-96231b3b80d8 David Blaikie 5 years ago
2 changed file(s) with 7 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
412412 }
413413
414414 SPCU->addLabelAddress(SPDie, dwarf::DW_AT_low_pc, FunctionBeginSym);
415 if (Triple(Asm->getTargetTriple()).isOSDarwin())
415 if (DwarfVersion < 4 || Triple(Asm->getTargetTriple()).isOSDarwin())
416416 SPCU->addLabelAddress(SPDie, dwarf::DW_AT_high_pc, FunctionEndSym);
417417 else
418418 SPCU->addLabelDelta(SPDie, dwarf::DW_AT_high_pc, FunctionEndSym,
None ; RUN: llc -mtriple=aarch64-non-linux-gnu < %s -filetype=obj | llvm-dwarfdump - | FileCheck %s
0 ; RUN: llc -mtriple=aarch64-non-linux-gnu -dwarf-version=4 < %s -filetype=obj \
1 ; RUN: | llvm-dwarfdump - | FileCheck -check-prefix=CHECK -check-prefix=CHECK-4 %s
2 ; RUN: llc -mtriple=aarch64-non-linux-gnu -dwarf-version=3 < %s -filetype=obj \
3 ; RUN: | llvm-dwarfdump - | FileCheck -check-prefix=CHECK -check-prefix=CHECK-3 %s
14
25 ; We're mostly checking that relocations are applied correctly
36 ; here. Currently R_AARCH64_ABS32 is used for references to debug data
1114 ; A couple of ABS64s similarly:
1215
1316 ; CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
14 ; CHECK: DW_AT_high_pc [DW_FORM_data4] (0x00000008)
17 ; CHECK-4: DW_AT_high_pc [DW_FORM_data4] (0x00000008)
18 ; CHECK-3: DW_AT_high_pc [DW_FORM_addr] (0x0000000000000008)
1519
1620 define i32 @main() nounwind {
1721 ret i32 0, !dbg !8