mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-21 18:29:46 +00:00
Improve test for merged global debug info by using llvm-dwarfdump.
It's a bit of a tradeoff, since llvm-dwarfdump doesn't print the name of the global symbol being used as an address in the addressing mode, but this avoids the dependence on hardcoded set labels that keep changing (5+ commits over the last few years that each update the set label as it changes due to other, unrelated differences in output). This could've, instead, been changed to match the set name then match the name in the string pool but that would present other issues (needing to skip over the sets that weren't of interest, etc) and checking that the addresses (granted, without relocations applied - so it's not the whole story) match in the two variable location descriptions seems sufficient and fairly stable here. There are a few similar other tests with similar label dependence that I'll update soonish. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214878 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2888b08b44
commit
effcb72a40
@ -1,4 +1,4 @@
|
||||
; RUN: llc < %s | FileCheck %s
|
||||
; RUN: llc -filetype=obj < %s | llvm-dwarfdump -debug-dump=info - | FileCheck %s
|
||||
|
||||
target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32"
|
||||
target triple = "thumbv7-apple-darwin10"
|
||||
@ -11,22 +11,22 @@ target triple = "thumbv7-apple-darwin10"
|
||||
|
||||
; Check debug info output for merged global.
|
||||
; DW_AT_location
|
||||
; DW_OP_addr
|
||||
; DW_OP_plus
|
||||
; .long __MergedGlobals
|
||||
; DW_OP_constu
|
||||
; offset
|
||||
; 0x03 DW_OP_addr
|
||||
; 0x.. .long __MergedGlobals
|
||||
; 0x10 DW_OP_constu
|
||||
; 0x.. offset
|
||||
; 0x22 DW_OP_plus
|
||||
|
||||
;CHECK: .long Lset7
|
||||
;CHECK-NEXT: @ DW_AT_type
|
||||
;CHECK-NEXT: @ DW_AT_decl_file
|
||||
;CHECK-NEXT: @ DW_AT_decl_line
|
||||
;CHECK-NEXT: @ DW_AT_location
|
||||
;CHECK-NEXT: .byte 3
|
||||
;CHECK-NEXT: .long __MergedGlobals
|
||||
;CHECK-NEXT: .byte 16
|
||||
;CHECK-NEXT: .byte 1
|
||||
;CHECK-NEXT: .byte 34
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_AT_name {{.*}} "x1"
|
||||
; CHECK-NOT: {{DW_TAG|NULL}}
|
||||
; CHECK: DW_AT_location [DW_FORM_exprloc] (<0x8> 03 [[ADDR:.. .. .. ..]] 10 00 22 )
|
||||
; CHECK: DW_TAG_variable
|
||||
; CHECK-NOT: DW_TAG
|
||||
; CHECK: DW_AT_name {{.*}} "x2"
|
||||
; CHECK-NOT: {{DW_TAG|NULL}}
|
||||
; CHECK: DW_AT_location [DW_FORM_exprloc] (<0x8> 03 [[ADDR]] 10 01 22 )
|
||||
|
||||
define zeroext i8 @get1(i8 zeroext %a) nounwind optsize {
|
||||
entry:
|
||||
|
Loading…
Reference in New Issue
Block a user