mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-25 00:29:20 +00:00
Use DwarfDebug::attachLowHighPC for the compilation unit DIE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216719 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
37e671e894
commit
622de3b2eb
@ -950,10 +950,7 @@ void DwarfDebug::finalizeModuleInfo() {
|
||||
0);
|
||||
} else {
|
||||
RangeSpan &Range = TheU->getRanges().back();
|
||||
U.addLocalLabelAddress(U.getUnitDie(), dwarf::DW_AT_low_pc,
|
||||
Range.getStart());
|
||||
U.addLabelDelta(U.getUnitDie(), dwarf::DW_AT_high_pc, Range.getEnd(),
|
||||
Range.getStart());
|
||||
attachLowHighPC(U, U.getUnitDie(), Range.getStart(), Range.getEnd());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,19 @@
|
||||
; REQUIRES: object-emission
|
||||
|
||||
; RUN: llc -mtriple=x86_64-linux -O0 -filetype=obj < %s \
|
||||
; RUN: | llvm-dwarfdump -debug-dump=info - | FileCheck %s
|
||||
; RUN: | llvm-dwarfdump -debug-dump=info - | FileCheck --check-prefix=CHECK --check-prefix=CHECK-V4 %s
|
||||
; RUN: llc -mtriple=x86_64-linux -dwarf-version=3 -O0 -filetype=obj < %s \
|
||||
; RUN: | llvm-dwarfdump -debug-dump=info - | FileCheck --check-prefix=CHECK --check-prefix=CHECK-V3 %s
|
||||
|
||||
; Check that we emit DW_TAG_lexical_block and that it has the right encoding
|
||||
; depending on the dwarf version.
|
||||
|
||||
; CHECK: DW_TAG_lexical_block
|
||||
; CHECK-NEXT: DW_AT_low_pc [DW_FORM_addr]
|
||||
; CHECK-NEXT: DW_AT_high_pc [DW_FORM_data4]
|
||||
; CHECK-NOT: {{DW_TAG|NULL}}
|
||||
; CHECK: DW_AT_low_pc [DW_FORM_addr]
|
||||
; CHECK-NOT: {{DW_TAG|NULL}}
|
||||
; CHECK-V4: DW_AT_high_pc [DW_FORM_data4]
|
||||
; CHECK-V3: DW_AT_high_pc [DW_FORM_addr]
|
||||
|
||||
; Test case produced from:
|
||||
; void b() {
|
||||
|
@ -1,14 +1,24 @@
|
||||
; RUN: llc -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj
|
||||
; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
|
||||
; RUN: llc -mtriple=x86_64-apple-darwin -filetype=obj < %s \
|
||||
; RUN: | llvm-dwarfdump -debug-dump=info - | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-V4
|
||||
; RUN: llc -mtriple=x86_64-apple-darwin -filetype=obj -dwarf-version=3 < %s \
|
||||
; RUN: | llvm-dwarfdump -debug-dump=info - | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-V3
|
||||
|
||||
; Check that we use DW_AT_low_pc
|
||||
|
||||
; Check that we use DW_AT_low_pc and that it has the right encoding depending
|
||||
; on dwarf version.
|
||||
|
||||
; CHECK: DW_TAG_compile_unit [1]
|
||||
; CHECK-NOT: {{DW_TAG|NULL}}
|
||||
; CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
|
||||
; CHECK: DW_AT_high_pc [DW_FORM_data4]
|
||||
; CHECK-NOT: {{DW_TAG|NULL}}
|
||||
; CHECK-V3: DW_AT_high_pc [DW_FORM_addr]
|
||||
; CHECK-V4: DW_AT_high_pc [DW_FORM_data4]
|
||||
; CHECK: DW_TAG_subprogram [2]
|
||||
; CHECK-NOT: {{DW_TAG|NULL}}
|
||||
; CHECK: DW_AT_low_pc [DW_FORM_addr]
|
||||
; CHECK: DW_AT_high_pc [DW_FORM_data4]
|
||||
; CHECK-NOT: {{DW_TAG|NULL}}
|
||||
; CHECK-V3: DW_AT_high_pc [DW_FORM_addr]
|
||||
; CHECK-V4: DW_AT_high_pc [DW_FORM_data4]
|
||||
|
||||
; Function Attrs: nounwind uwtable
|
||||
define void @z() #0 {
|
||||
|
Loading…
Reference in New Issue
Block a user