diff options
Diffstat (limited to 'llvm/test')
79 files changed, 373 insertions, 506 deletions
diff --git a/llvm/test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll b/llvm/test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll index 2cd12c8e2fe..2cae9ca82d3 100644 --- a/llvm/test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll +++ b/llvm/test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll @@ -9,24 +9,17 @@ target triple = "thumbv7-apple-darwin10" @x3 = internal global i8 1, align 1, !dbg !6 @x4 = internal global i8 1, align 1, !dbg !8 @x5 = global i8 1, align 1, !dbg !10 -; Check debug info output for merged global. -; DW_AT_location -; 0x03 DW_OP_addr -; 0x.. .long __MergedGlobals -; 0x10 DW_OP_constu -; 0x.. offset -; 0x22 DW_OP_plus ; 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] (<0x5> 03 [[ADDR:.. .. .. ..]] ) +; CHECK: DW_AT_location [DW_FORM_exprloc] (DW_OP_addr [[ADDR:0x[0-9a-fA-F]+]]) ; 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] (<0x7> 03 [[ADDR]] 23 01 ) +; CHECK: DW_AT_location [DW_FORM_exprloc] (DW_OP_addr [[ADDR]], DW_OP_plus_uconst 0x1) ; Function Attrs: nounwind optsize define zeroext i8 @get1(i8 zeroext %a) #0 !dbg !16 { diff --git a/llvm/test/CodeGen/ARM/2011-08-02-MergedGlobalDbg.ll b/llvm/test/CodeGen/ARM/2011-08-02-MergedGlobalDbg.ll index 379bc16555b..79541a7594a 100644 --- a/llvm/test/CodeGen/ARM/2011-08-02-MergedGlobalDbg.ll +++ b/llvm/test/CodeGen/ARM/2011-08-02-MergedGlobalDbg.ll @@ -1,23 +1,15 @@ ; RUN: llc -arm-global-merge -global-merge-group-by-use=false -filetype=obj < %s | llvm-dwarfdump -debug-dump=info - | FileCheck %s -; Check debug info output for merged global. -; DW_AT_location -; 0x03 DW_OP_addr -; 0x.. .long __MergedGlobals -; 0x10 DW_OP_constu -; 0x.. offset -; 0x22 DW_OP_plus - ; 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] (<0x5> 03 [[ADDR:.. .. .. ..]] ) +; CHECK: DW_AT_location [DW_FORM_exprloc] (DW_OP_addr [[ADDR:0x[0-9a-fA-F]+]]) ; 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] (<0x7> 03 [[ADDR]] 23 04 ) +; CHECK: DW_AT_location [DW_FORM_exprloc] (DW_OP_addr [[ADDR]], DW_OP_plus_uconst 0x4) source_filename = "test/CodeGen/ARM/2011-08-02-MergedGlobalDbg.ll" 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" diff --git a/llvm/test/CodeGen/ARM/debug-info-blocks.ll b/llvm/test/CodeGen/ARM/debug-info-blocks.ll index 5aa5fcda93c..654bff424a8 100644 --- a/llvm/test/CodeGen/ARM/debug-info-blocks.ll +++ b/llvm/test/CodeGen/ARM/debug-info-blocks.ll @@ -5,17 +5,11 @@ ; CHECK-NOT: DW_TAG_subprogram ; CHECK: DW_TAG_variable ; CHECK-NOT: DW_TAG -; CHECK-NEXT: DW_AT_location [DW_FORM_sec_offset] ([[MYDATA_LOC:0x[0-9a-f]*]]) +; CHECK-NEXT: DW_AT_location [DW_FORM_sec_offset] +; CHECK-NEXT: 0x{{.*}} - 0x{{.*}}: {{.*}} DW_OP_plus_uconst 0x4, DW_OP_deref, DW_OP_plus_uconst 0x18 +; CHECK-NEXT: 0x{{.*}} - 0x{{.*}}: {{.*}} DW_OP_plus_uconst 0x4, DW_OP_deref, DW_OP_plus_uconst 0x18 ; CHECK-NEXT: DW_AT_name {{.*}} "mydata" -; debug_loc content -; CHECK: .debug_loc contents: -; CHECK: [[MYDATA_LOC]]: Beginning address offset: {{.*}} -; CHECK-NOT: {{0x[0-9a-f]*}}: Beginning address offset -; CHECK: Location description: {{.*}} 23 04 06 23 18 -; CHECK-NOT: {{0x[0-9a-f]*}}: Beginning address offset -; CHECK: Location description: {{.*}} 23 04 06 23 18 - ; Radar 9331779 target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:64-v128:32:128-a0:0:32-n32" target triple = "thumbv7-apple-ios" diff --git a/llvm/test/CodeGen/ARM/debug-info-sreg2.ll b/llvm/test/CodeGen/ARM/debug-info-sreg2.ll index 3b435a1ab29..ec2bd04e185 100644 --- a/llvm/test/CodeGen/ARM/debug-info-sreg2.ll +++ b/llvm/test/CodeGen/ARM/debug-info-sreg2.ll @@ -5,12 +5,9 @@ target triple = "thumbv7-apple-macosx10.6.7" ; Just making sure the first part of the location isn't a repetition ; of the size of the location description. -; -; 0x90 DW_OP_regx of super-register -; CHECK: 0x00000000: Beginning address offset: -; CHECK-NEXT: Ending address offset: -; CHECK-NEXT: Location description: 90 {{.. .. $}} +; CHECK: 0x00000000: +; CHECK-NEXT: 0x{{[0-9]*[a-f]*}} - 0x{{[0-9]*[a-f]*}}: DW_OP_regx D8 define void @_Z3foov() optsize ssp !dbg !1 { entry: diff --git a/llvm/test/CodeGen/X86/2010-01-18-DbgValue.ll b/llvm/test/CodeGen/X86/2010-01-18-DbgValue.ll index 60f441cff72..cbac015c357 100644 --- a/llvm/test/CodeGen/X86/2010-01-18-DbgValue.ll +++ b/llvm/test/CodeGen/X86/2010-01-18-DbgValue.ll @@ -5,8 +5,7 @@ ; CHECK-LABEL: DW_TAG_subprogram ; CHECK: DW_AT_name [DW_FORM_strp] ( {{.*}}"foo") ; CHECK: DW_TAG_formal_parameter -; CHECK-NEXT: DW_AT_location [DW_FORM_exprloc] (<0x2> 91 {{..}} ) -; DW_OP_fbreg ?? +; CHECK-NEXT: DW_AT_location [DW_FORM_exprloc] (DW_OP_fbreg {{[^ ]*}}) ; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( {{.*}}"my_r0") %struct.Pt = type { double, double } diff --git a/llvm/test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll b/llvm/test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll index d4f4e905710..68edc1c3edb 100644 --- a/llvm/test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll +++ b/llvm/test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll @@ -9,7 +9,8 @@ target triple = "x86_64-apple-darwin10.0.0" ; CHECK: DW_TAG_variable ; CHECK: DW_TAG_variable ; CHECK-NEXT: DW_AT_location -; CHECK-NEXT: DW_AT_name {{.*}} "z_s" +; CHECK-NOT: DW_{{TAG|AT}} +; CHECK: DW_AT_name {{.*}} "z_s" ; CHECK-NEXT: DW_AT_decl_file ; CHECK-NEXT: DW_AT_decl_line ; CHECK-NEXT: DW_AT_type{{.*}}{[[TYPE:.*]]} diff --git a/llvm/test/CodeGen/X86/dbg-baseptr.ll b/llvm/test/CodeGen/X86/dbg-baseptr.ll index 893ca93a994..5dd1056b44e 100644 --- a/llvm/test/CodeGen/X86/dbg-baseptr.ll +++ b/llvm/test/CodeGen/X86/dbg-baseptr.ll @@ -22,12 +22,10 @@ define i32 @f0(%struct.s* byval align 8 %input) !dbg !8 { ; DWARF-LABEL: .debug_info contents: ; DWARF-LABEL: DW_TAG_subprogram -; DWARF: DW_AT_frame_base [DW_FORM_exprloc] (<0x1> 57 ) -; 0x57 -> RSP +; DWARF: DW_AT_frame_base [DW_FORM_exprloc] (DW_OP_reg7 RSP) ; DWARF: DW_AT_name [DW_FORM_strp] ( {{.*}}"f0") ; DWARF: DW_TAG_formal_parameter -; DWARF-NEXT: DW_AT_location [DW_FORM_exprloc] (<0x2> 91 08 ) -; DW_OP_fbreg (0x91) 0x08 +; DWARF-NEXT: DW_AT_location [DW_FORM_exprloc] (DW_OP_fbreg +8) ; DWARF-NEXT: DW_AT_name [DW_FORM_strp] ( {{.*}}"input") @@ -48,12 +46,10 @@ define i32 @f1(%struct.s* byval align 8 %input) !dbg !19 { } ; DWARF-LABEL: DW_TAG_subprogram -; DWARF: DW_AT_frame_base [DW_FORM_exprloc] (<0x1> 56 ) -; 0x56 -> RBP +; DWARF: DW_AT_frame_base [DW_FORM_exprloc] (DW_OP_reg6 RBP) ; DWARF: DW_AT_name [DW_FORM_strp] ( {{.*}}"f1") ; DWARF: DW_TAG_formal_parameter -; DWARF-NEXT: DW_AT_location [DW_FORM_exprloc] (<0x2> 91 10 ) -; DW_OP_fbreg (0x91) 0x10 +; DWARF-NEXT: DW_AT_location [DW_FORM_exprloc] (DW_OP_fbreg +16) ; DWARF-NEXT: DW_AT_name [DW_FORM_strp] ( {{.*}}"input") ; CHECK-LABEL: f2: @@ -75,12 +71,10 @@ define i32 @f2(%struct.s* byval align 8 %input) !dbg !22 { ; "input" should still be referred to through RBP. ; DWARF-LABEL: DW_TAG_subprogram -; DWARF: DW_AT_frame_base [DW_FORM_exprloc] (<0x1> 56 ) -; 0x56 -> RBP +; DWARF: DW_AT_frame_base [DW_FORM_exprloc] (DW_OP_reg6 RBP) ; DWARF: DW_AT_name [DW_FORM_strp] ( {{.*}}"f2") ; DWARF: DW_TAG_formal_parameter -; DWARF-NEXT: DW_AT_location [DW_FORM_exprloc] (<0x2> 91 10 ) -; DW_OP_fbreg (0x91) 0x10 +; DWARF-NEXT: DW_AT_location [DW_FORM_exprloc] (DW_OP_fbreg +16) ; DWARF-NEXT: DW_AT_name [DW_FORM_strp] ( {{.*}}"input") declare void @llvm.dbg.declare(metadata, metadata, metadata) diff --git a/llvm/test/DebugInfo/AArch64/asan-stack-vars.ll b/llvm/test/DebugInfo/AArch64/asan-stack-vars.ll index 3ae3b46bfa1..2c0631468e0 100644 --- a/llvm/test/DebugInfo/AArch64/asan-stack-vars.ll +++ b/llvm/test/DebugInfo/AArch64/asan-stack-vars.ll @@ -27,13 +27,11 @@ ; CHECK-NEXT: DW_AT_high_pc [DW_FORM_addr] ([[FN_END:.*]]) ; CHECK: "_cmd" ; CHECK: DW_TAG_formal_parameter -; CHECK-NEXT: DW_AT_location {{.*}} ([[OFS:.*]]) +; CHECK-NEXT: DW_AT_location +; CHECK-NEXT: 0x{{0*}} - 0x{{.*}}: +; CHECK-NOT: DW_AT_ +; CHECK: 0x{{.*}} - [[FN_END]]: ; CHECK-NEXT: DW_AT_name {{.*}}"imageSize" -; -; CHECK: .debug_loc contents: -; CHECK: [[OFS]]: Beginning address offset: 0x0000000000000000 -; CHECK_NOT: 0x{{.*}}: Beginning -; CHECK: Ending address offset: [[FN_END]] ; ModuleID = 'm.m' source_filename = "m.m" diff --git a/llvm/test/DebugInfo/AArch64/bitfields.ll b/llvm/test/DebugInfo/AArch64/bitfields.ll index c6fa8f78272..293f6f8fce0 100644 --- a/llvm/test/DebugInfo/AArch64/bitfields.ll +++ b/llvm/test/DebugInfo/AArch64/bitfields.ll @@ -19,12 +19,12 @@ ; CHECK: DW_AT_byte_size {{.*}} (0x04) ; CHECK-NEXT: DW_AT_bit_size {{.*}} (0x02) ; CHECK-NEXT: DW_AT_bit_offset {{.*}} (0x00) -; CHECK-NEXT: DW_AT_data_member_location {{.*}} 00 +; CHECK-NEXT: DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0x0) ; CHECK: DW_TAG_member ; CHECK-NEXT: DW_AT_name{{.*}}"b" ; CHECK-NOT: DW_TAG_member -; CHECK: DW_AT_data_member_location {{.*}} 04 +; CHECK: DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0x4) ; CHECK: DW_TAG_member ; CHECK-NEXT: DW_AT_name{{.*}}"c" @@ -32,7 +32,7 @@ ; CHECK: DW_AT_byte_size {{.*}} (0x04) ; CHECK-NEXT: DW_AT_bit_size {{.*}} (0x01) ; CHECK-NEXT: DW_AT_bit_offset {{.*}} (0x00) -; CHECK-NEXT: DW_AT_data_member_location {{.*}} 08 +; CHECK: DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0x8) ; CHECK: DW_TAG_member ; CHECK-NEXT: DW_AT_name{{.*}}"d" @@ -40,7 +40,7 @@ ; CHECK: DW_AT_byte_size {{.*}} (0x04) ; CHECK-NEXT: DW_AT_bit_size {{.*}} (0x1c) ; CHECK-NEXT: DW_AT_bit_offset {{.*}} (0x01) -; CHECK-NEXT: DW_AT_data_member_location {{.*}} 08 +; CHECK-NEXT: DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0x8) ; ModuleID = 'bitfields.c' source_filename = "test/DebugInfo/AArch64/bitfields.ll" diff --git a/llvm/test/DebugInfo/AArch64/coalescing.ll b/llvm/test/DebugInfo/AArch64/coalescing.ll index 810ba5ae83f..31d821054c8 100644 --- a/llvm/test/DebugInfo/AArch64/coalescing.ll +++ b/llvm/test/DebugInfo/AArch64/coalescing.ll @@ -23,10 +23,8 @@ entry: ; CHECK: .debug_info contents: ; CHECK: DW_TAG_variable ; CHECK-NEXT: DW_AT_location + ; CHECK-NEXT: DW_OP_breg31 WSP+12, DW_OP_deref ; CHECK-NEXT: DW_AT_name {{.*}}"size" - ; CHECK: .debug_loc contents: - ; Expecting the encoding for sp+12: DW_OP_breg31 0c - ; CHECK: Location description: 8f 0c ret void, !dbg !18 } diff --git a/llvm/test/DebugInfo/AArch64/frameindices.ll b/llvm/test/DebugInfo/AArch64/frameindices.ll index 3222b5eb0e6..efdb704c10f 100644 --- a/llvm/test/DebugInfo/AArch64/frameindices.ll +++ b/llvm/test/DebugInfo/AArch64/frameindices.ll @@ -5,8 +5,7 @@ ; CHECK: DW_TAG_inlined_subroutine ; CHECK: "_Z3f111A" ; CHECK: DW_TAG_formal_parameter -; CHECK: DW_AT_location [DW_FORM_block1] (<0x0c> 93 01 91 51 93 0f 93 01 91 4a 93 07 ) -; -- piece 0x00000001, fbreg -47, piece 0x0000000f, piece 0x00000001, fbreg -54, piece 0x00000007 ------^ +; CHECK: DW_AT_location [DW_FORM_block1] (DW_OP_piece 0x1, DW_OP_fbreg -47, DW_OP_piece 0xf, DW_OP_piece 0x1, DW_OP_fbreg -54, DW_OP_piece 0x7) ; CHECK: DW_AT_abstract_origin {{.*}} "p1" ; ; long a; diff --git a/llvm/test/DebugInfo/AMDGPU/variable-locations.ll b/llvm/test/DebugInfo/AMDGPU/variable-locations.ll index 93a0f26d1f1..68627aacf15 100644 --- a/llvm/test/DebugInfo/AMDGPU/variable-locations.ll +++ b/llvm/test/DebugInfo/AMDGPU/variable-locations.ll @@ -19,7 +19,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) ; CHECK-NEXT: DW_AT_external ; CHECK-NEXT: DW_AT_decl_file ; CHECK-NEXT: DW_AT_decl_line -; CHECK-NEXT: DW_AT_location [DW_FORM_block1] (<0x09> 03 00 00 00 00 00 00 00 00 ) +; CHECK-NEXT: DW_AT_location [DW_FORM_block1] (DW_OP_addr 0x0) @GlobA = common addrspace(1) global i32 0, align 4, !dbg !0 ; CHECK: {{.*}}DW_TAG_variable @@ -28,20 +28,20 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) ; CHECK-NEXT: DW_AT_external ; CHECK-NEXT: DW_AT_decl_file ; CHECK-NEXT: DW_AT_decl_line -; CHECK-NEXT: DW_AT_location [DW_FORM_block1] (<0x09> 03 00 00 00 00 00 00 00 00 ) +; CHECK-NEXT: DW_AT_location [DW_FORM_block1] (DW_OP_addr 0x0) @GlobB = common addrspace(1) global i32 0, align 4, !dbg !6 define amdgpu_kernel void @kernel1( ; CHECK: {{.*}}DW_TAG_formal_parameter -; CHECK-NEXT: DW_AT_location [DW_FORM_block1] (<0x06> 91 04 10 01 16 18 ) +; CHECK-NEXT: DW_AT_location [DW_FORM_block1] (DW_OP_fbreg +4, DW_OP_constu 0x1, DW_OP_swap, DW_OP_xderef) ; CHECK-NEXT: DW_AT_name {{.*}}"ArgN" i32 %ArgN, ; CHECK: {{.*}}DW_TAG_formal_parameter -; CHECK-NEXT: DW_AT_location [DW_FORM_block1] (<0x06> 91 08 10 01 16 18 ) +; CHECK-NEXT: DW_AT_location [DW_FORM_block1] (DW_OP_fbreg +8, DW_OP_constu 0x1, DW_OP_swap, DW_OP_xderef) ; CHECK-NEXT: DW_AT_name {{.*}}"ArgA" i32 addrspace(1)* %ArgA, ; CHECK: {{.*}}DW_TAG_formal_parameter -; CHECK-NEXT: DW_AT_location [DW_FORM_block1] (<0x06> 91 10 10 01 16 18 ) +; CHECK-NEXT: DW_AT_location [DW_FORM_block1] (DW_OP_fbreg +16, DW_OP_constu 0x1, DW_OP_swap, DW_OP_xderef) ; CHECK-NEXT: DW_AT_name {{.*}}"ArgB" i32 addrspace(1)* %ArgB) !dbg !13 { entry: diff --git a/llvm/test/DebugInfo/ARM/PR16736.ll b/llvm/test/DebugInfo/ARM/PR16736.ll index 331495e8e91..cb668c90fef 100644 --- a/llvm/test/DebugInfo/ARM/PR16736.ll +++ b/llvm/test/DebugInfo/ARM/PR16736.ll @@ -1,10 +1,23 @@ ; RUN: llc -filetype=asm < %s | FileCheck %s ; RUN: llc -filetype=obj < %s \ -; RUN: | llvm-dwarfdump - | FileCheck %s --check-prefix=DWARF +; RUN: | llvm-dwarfdump -debug-dump=info - | FileCheck %s --check-prefix=DWARF ; ; CHECK: @DEBUG_VALUE: h:x <- [DW_OP_plus_uconst {{.*}}] [%R{{.*}}+0] -; DWARF: Location description: {{7[0-9] [0-9]+ $}} -; DW_OP_breg. +.. +; DWARF: DW_TAG_formal_parameter +; DWARF: DW_AT_location +; DWARF-NEXT: DW_OP_reg0 R0 +; DWARF: DW_TAG_formal_parameter +; DWARF: DW_AT_location +; DWARF-NEXT: DW_OP_reg1 R1 +; DWARF: DW_TAG_formal_parameter +; DWARF: DW_AT_location +; DWARF-NEXT: DW_OP_reg2 R2 +; DWARF: DW_TAG_formal_parameter +; DWARF: DW_AT_location +; DWARF-NEXT: DW_OP_reg3 R3 +; DWARF: DW_TAG_formal_parameter +; DWARF: DW_AT_location +; DWARF-NEXT: DW_OP_breg7 R7+8 ; generated from: ; clang -cc1 -triple thumbv7 -S -O1 arm.cpp -g ; diff --git a/llvm/test/DebugInfo/ARM/PR26163.ll b/llvm/test/DebugInfo/ARM/PR26163.ll index 58a4205987d..fd84c9b0229 100644 --- a/llvm/test/DebugInfo/ARM/PR26163.ll +++ b/llvm/test/DebugInfo/ARM/PR26163.ll @@ -1,4 +1,4 @@ -; RUN: llc -filetype=obj -o - < %s | llvm-dwarfdump - | FileCheck %s +; RUN: llc -filetype=obj -o - < %s | llvm-dwarfdump -debug-dump=info - | FileCheck %s ; ; Checks that we're creating two ranges, one that terminates immediately ; and one that spans the rest of the function. This isn't necessarily the @@ -6,13 +6,11 @@ ; one has a bit_piece), but it is what is currently being emitted, any ; change here needs to be intentional, so the test is very specific. ; -; CHECK: .debug_loc contents: -; CHECK: 0x00000000: Beginning address offset: 0x0000000000000004 -; CHECK: Ending address offset: 0x0000000000000004 -; CHECK: Location description: 10 00 9f -; CHECK: Beginning address offset: 0x0000000000000004 -; CHECK: Ending address offset: 0x0000000000000014 -; CHECK: Location description: 10 00 9f +; CHECK: DW_TAG_inlined_subroutine +; CHECK: DW_TAG_variable +; CHECK: DW_AT_location [DW_FORM_sec_offset] ({{.*}} +; CHECK: 0x0000000000000004 - 0x0000000000000004: DW_OP_constu 0x0, DW_OP_stack_value, DW_OP_piece 0x8 +; CHECK: 0x0000000000000004 - 0x0000000000000014: DW_OP_constu 0x0, DW_OP_stack_value, DW_OP_piece 0x4) ; Created form the following test case (PR26163) with ; clang -cc1 -triple armv4t--freebsd11.0-gnueabi -emit-obj -debug-info-kind=standalone -O2 -x c test.c diff --git a/llvm/test/DebugInfo/ARM/bitfield.ll b/llvm/test/DebugInfo/ARM/bitfield.ll index 56a30e3e547..97453c6c262 100644 --- a/llvm/test/DebugInfo/ARM/bitfield.ll +++ b/llvm/test/DebugInfo/ARM/bitfield.ll @@ -14,7 +14,7 @@ ; CHECK: DW_AT_byte_size {{.*}} (0x04) ; CHECK: DW_AT_bit_size {{.*}} (0x1c) ; CHECK: DW_AT_bit_offset {{.*}} (0xfffffffffffffff8) -; CHECK: DW_AT_data_member_location {{.*}}00 +; CHECK: DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0x0) source_filename = "test/DebugInfo/ARM/bitfield.ll" target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32" target triple = "thumbv7-apple-ios" diff --git a/llvm/test/DebugInfo/ARM/partial-subreg.ll b/llvm/test/DebugInfo/ARM/partial-subreg.ll index da9760ce76a..52e89125163 100644 --- a/llvm/test/DebugInfo/ARM/partial-subreg.ll +++ b/llvm/test/DebugInfo/ARM/partial-subreg.ll @@ -8,12 +8,9 @@ ; CHECK: DW_TAG_subprogram ; CHECK: DW_AT_name {{.*}}"subscript.get" ; CHECK: DW_TAG_formal_parameter -; CHECK-NEXT: DW_AT_location [DW_FORM_sec_offset] (0x00000000) -; CHECK: .debug_loc -; CHECK: 0x00000000: Beginning address offset -; CHECK-NEXT: Ending address offset -; CHECK-NEXT: Location description: 90 90 02 93 08 90 91 02 93 04 -; d16, piece 0x00000008, d17, piece 0x00000004 +; CHECK-NEXT: DW_AT_location [DW_FORM_sec_offset] ({{.*}} +; CHECK-NEXT: 0x{{.*}} - 0x{{.*}}: DW_OP_regx D16, DW_OP_piece 0x8, DW_OP_regx D17, DW_OP_piece 0x4, DW_OP_regx D16, DW_OP_piece 0x8, DW_OP_regx D17, DW_OP_piece 0x4 + source_filename = "simd.ll" target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32" target triple = "armv7-apple-ios7.0" diff --git a/llvm/test/DebugInfo/ARM/s-super-register.ll b/llvm/test/DebugInfo/ARM/s-super-register.ll index a6e501db85f..30c8bda1de9 100644 --- a/llvm/test/DebugInfo/ARM/s-super-register.ll +++ b/llvm/test/DebugInfo/ARM/s-super-register.ll @@ -4,8 +4,7 @@ target triple = "thumbv7-apple-macosx10.6.7" ; The S registers on ARM are expressed as pieces of their super-registers in DWARF. ; -; 0x90 DW_OP_regx of super-register -; CHECK: Location description: 90 +; CHECK: DW_OP_regx define void @_Z3foov() optsize ssp !dbg !1 { entry: diff --git a/llvm/test/DebugInfo/ARM/split-complex.ll b/llvm/test/DebugInfo/ARM/split-complex.ll index a6a9214b145..2e65f2ff84f 100644 --- a/llvm/test/DebugInfo/ARM/split-complex.ll +++ b/llvm/test/DebugInfo/ARM/split-complex.ll @@ -14,8 +14,7 @@ entry: ; The target has no native double type. ; SROA split the complex value into two i64 values. ; CHECK: DW_TAG_formal_parameter - ; CHECK-NEXT: DW_AT_location [DW_FORM_block1] (<0x04> 10 00 93 08 ) - ; DW_AT_location ( constu 0x00000000, piece 0x00000008 ) + ; CHECK-NEXT: DW_AT_location [DW_FORM_block1] (DW_OP_constu 0x0, DW_OP_piece 0x8) ; CHECK-NEXT: DW_AT_name {{.*}} "c" tail call void @llvm.dbg.value(metadata i64 0, metadata !14, metadata !17), !dbg !16 ; Manually removed to disable location list emission: diff --git a/llvm/test/DebugInfo/Generic/incorrect-variable-debugloc1.ll b/llvm/test/DebugInfo/Generic/incorrect-variable-debugloc1.ll index 2257db16051..0bd28214089 100644 --- a/llvm/test/DebugInfo/Generic/incorrect-variable-debugloc1.ll +++ b/llvm/test/DebugInfo/Generic/incorrect-variable-debugloc1.ll @@ -23,8 +23,11 @@ ; return c; ; } -; DWARF23: Location description: 10 0d {{$}} -; DWARF4: Location description: 10 0d 9f +; CHECK: DW_TAG_variable +; CHECK: DW_AT_location +; CHECK-NOT: DW_AT +; DWARF23: DW_OP_constu 0xd{{$}} +; DWARF4: DW_OP_constu 0xd, DW_OP_stack_value{{$}} ; Function Attrs: uwtable define i32 @main() #0 !dbg !4 { diff --git a/llvm/test/DebugInfo/MIR/AArch64/clobber-sp.mir b/llvm/test/DebugInfo/MIR/AArch64/clobber-sp.mir index d65632ec0ce..92eacf48252 100644 --- a/llvm/test/DebugInfo/MIR/AArch64/clobber-sp.mir +++ b/llvm/test/DebugInfo/MIR/AArch64/clobber-sp.mir @@ -3,20 +3,11 @@ # CHECK: .debug_info contents: # CHECK: DW_TAG_formal_parameter # CHECK: DW_TAG_formal_parameter -# CHECK-NEXT: DW_AT_location [DW_FORM_data4] ([[LOC:.*]]) +# CHECK-NEXT: DW_AT_location +# CHECK-NEXT: 0x0000000000000000 - 0x0000000000000014: DW_OP_reg1 W1 +# CHECK-NEXT: 0x0000000000000014 - 0x0000000000000038: DW_OP_breg31 WSP+8 # CHECK-NEXT: DW_AT_name {{.*}}"y" -# CHECK: .debug_loc contents: -# CHECK: [[LOC]]: -# CHECK-SAME: Beginning address offset: 0x0000000000000000 -# CHECK-NEXT: Ending address offset: 0x0000000000000014 -# CHECK-NEXT: Location description: 51 -# reg1 -# -# The range of y's [SP+8] location must not be interrupted by the call to h. -# CHECK: Beginning address offset: 0x0000000000000014 -# CHECK-NEXT: Ending address offset: 0x0000000000000038 -# CHECK-NEXT: Location description: 8f 08 -# breg31 +8 + --- | ; Generated at -Os from: ; struct Rect { diff --git a/llvm/test/DebugInfo/MIR/ARM/split-superreg-piece.mir b/llvm/test/DebugInfo/MIR/ARM/split-superreg-piece.mir index 8ac763b0f06..40890fa0da7 100644 --- a/llvm/test/DebugInfo/MIR/ARM/split-superreg-piece.mir +++ b/llvm/test/DebugInfo/MIR/ARM/split-superreg-piece.mir @@ -1,14 +1,11 @@ # RUN: llc -start-before=livedebugvalues -filetype=obj -o - %s | \ -# RUN: llvm-dwarfdump - | FileCheck %s +# RUN: llvm-dwarfdump -debug-dump=info - | FileCheck %s # CHECK: .debug_info contents: # CHECK: DW_TAG_variable -# CHECK-NEXT: DW_AT_location [DW_FORM_data4] ([[OFS:.*]]) +# CHECK-NEXT: DW_AT_location +# CHECK-NEXT: 0x0000000000000010 - 0x0000000000000018: DW_OP_piece 0x10, DW_OP_regx D0, DW_OP_piece 0x8, DW_OP_regx D1, DW_OP_piece 0x8) # CHECK-NEXT: DW_AT_name {{.*}}"vec" -# CHECK: .debug_loc contents: -# CHECK: [[OFS]]: Beginning address offset: 0x0000000000000010 -# CHECK: Ending address offset: 0x0000000000000018 -# CHECK: Location description: 93 10 90 80 02 93 08 90 81 02 93 08 -# piece 0x00000010, d0, piece 0x00000008, d1, piece 0x00000008 + --- | ; Generate from (and then manually modified to incorporate a DW_OP_LLVM_fragment): ; typedef float vec2 __attribute__((vector_size(16))); diff --git a/llvm/test/DebugInfo/MIR/ARM/split-superreg.mir b/llvm/test/DebugInfo/MIR/ARM/split-superreg.mir index a2c38442da9..11ec6f3a198 100644 --- a/llvm/test/DebugInfo/MIR/ARM/split-superreg.mir +++ b/llvm/test/DebugInfo/MIR/ARM/split-superreg.mir @@ -2,13 +2,10 @@ # RUN: llvm-dwarfdump - | FileCheck %s # CHECK: .debug_info contents: # CHECK: DW_TAG_variable -# CHECK-NEXT: DW_AT_location [DW_FORM_data4] ([[OFS:.*]]) +# CHECK-NEXT: DW_AT_location +# CHECK-NEXT: 0x0000000000000010 - 0x0000000000000018: DW_OP_regx D0, DW_OP_piece 0x8, DW_OP_regx D1, DW_OP_piece 0x8) # CHECK-NEXT: DW_AT_name {{.*}}"vec" -# CHECK: .debug_loc contents: -# CHECK: [[OFS]]: Beginning address offset: 0x0000000000000010 -# CHECK: Ending address offset: 0x0000000000000018 -# CHECK: Location description: 90 80 02 93 08 90 81 02 93 08 -# d0, piece 0x00000008, d1, piece 0x00000008 + --- | ; Generated from: ; typedef float vec2 __attribute__((vector_size(16))); diff --git a/llvm/test/DebugInfo/MIR/X86/bit-piece-dh.mir b/llvm/test/DebugInfo/MIR/X86/bit-piece-dh.mir index d4b897eaac9..cd3bde10ad3 100644 --- a/llvm/test/DebugInfo/MIR/X86/bit-piece-dh.mir +++ b/llvm/test/DebugInfo/MIR/X86/bit-piece-dh.mir @@ -1,8 +1,7 @@ # RUN: llc -filetype=obj -o - %s | llvm-dwarfdump --debug-dump=info - | FileCheck %s # CHECK: .debug_info contents: # CHECK: DW_TAG_variable -# rdx, bit-piece 8 8 -# CHECK-NEXT: DW_AT_location {{.*}} 51 9d 08 08 +# CHECK-NEXT: DW_AT_location {{.*}} (DW_OP_reg1 RDX, DW_OP_bit_piece 0x8 0x8) # CHECK-NEXT: DW_AT_name {{.*}}"dh" --- | ; Manually created after: diff --git a/llvm/test/DebugInfo/Mips/dsr-fixed-objects.ll b/llvm/test/DebugInfo/Mips/dsr-fixed-objects.ll index 682ecd23483..71a90942129 100644 --- a/llvm/test/DebugInfo/Mips/dsr-fixed-objects.ll +++ b/llvm/test/DebugInfo/Mips/dsr-fixed-objects.ll @@ -1,7 +1,5 @@ ; RUN: llc -march=mips -mcpu=mips32r2 -O1 -filetype=obj -relocation-model=pic <%s | \ -; RUN: llvm-dwarfdump -debug-dump=all - | FileCheck %s -check-prefix=F0 -; RUN: llc -march=mips -mcpu=mips32r2 -O1 -filetype=obj -relocation-model=pic <%s | \ -; RUN: llvm-dwarfdump -debug-dump=all - | FileCheck %s -check-prefix=F1 +; RUN: llvm-dwarfdump -debug-dump=all - | FileCheck %s ; void foo(int *); ; @@ -22,15 +20,12 @@ declare void @llvm.lifetime.end(i64, i8* nocapture) declare void @foo(i32*) -; F0: DW_AT_name {{.*}}"e" -; F0: DW_TAG_variable -; F0-NEXT: DW_AT_location [DW_FORM_sec_offset] ([[LOC:.*]]) -; F0-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000006b] = "x") -; -; x -> DW_OP_reg1(51) -; F0: [[LOC]]: Beginning address offset: 0x0000000000000028 -; F0: Ending address offset: 0x000000000000002c -; F0: Location description: 51 +; CHECK: DW_AT_name {{.*}}"e" +; CHECK: DW_TAG_variable +; CHECK-NEXT: DW_AT_location [DW_FORM_sec_offset] ( +; CHECK-NEXT: 0x0000000000000028 - 0x000000000000002c: DW_OP_reg1 AT_64 +; CHECK-NEXT: 0x000000000000002c - 0x0000000000000048: DW_OP_breg29 SP_64+16, DW_OP_deref) +; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000006b] = "x") define i32 @f0(i32 signext %a, i32 signext %b, i32 signext %c, i32 signext %d, i32 signext %e) !dbg !4 { entry: @@ -57,16 +52,11 @@ entry: } -; F1: DW_AT_name {{.*}}"x" -; F1: DW_AT_name {{.*}}"e" -; F1: DW_TAG_variable -; F1-NEXT: DW_AT_location [DW_FORM_sec_offset] ([[LOC:.*]]) -; F1-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000006b] = "x") - -; x -> DW_OP_reg1(51) -; F1: [[LOC]]: Beginning address offset: 0x0000000000000080 -; F1: Ending address offset: 0x0000000000000084 -; F1: Location description: 51 +; CHECK: DW_TAG_variable +; CHECK-NEXT: DW_AT_location [DW_FORM_sec_offset] ( +; CHECK-NEXT: 0x0000000000000080 - 0x0000000000000084: DW_OP_reg1 AT_64 +; CHECK-NEXT: 0x0000000000000084 - 0x0000000000000098: DW_OP_breg29 SP_64+16, DW_OP_deref) +; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000006b] = "x") define i32 @f1(i32 signext %a, i32 signext %b, i32 signext %c, i32 signext %d, i32 signext %e) !dbg !15 { entry: diff --git a/llvm/test/DebugInfo/Mips/dsr-non-fixed-objects.ll b/llvm/test/DebugInfo/Mips/dsr-non-fixed-objects.ll index 91d932b50e4..a38bd415048 100644 --- a/llvm/test/DebugInfo/Mips/dsr-non-fixed-objects.ll +++ b/llvm/test/DebugInfo/Mips/dsr-non-fixed-objects.ll @@ -1,7 +1,5 @@ ; RUN: llc -march=mips -mcpu=mips32r2 -O0 -filetype=obj -fast-isel=0 <%s | \ -; RUN: llvm-dwarfdump -debug-dump=all - | FileCheck %s -check-prefix=F2 -; RUN: llc -march=mips -mcpu=mips32r2 -O0 -filetype=obj -fast-isel=0 <%s | \ -; RUN: llvm-dwarfdump -debug-dump=all - | FileCheck %s -check-prefix=F3 +; RUN: llvm-dwarfdump -debug-dump=all - | FileCheck %s declare void @llvm.dbg.declare(metadata, metadata, metadata) @@ -22,9 +20,9 @@ declare void @foo(i32*) ; return w; ; } -; c -> DW_OP_breg29(r29): 16 -; F2: DW_AT_location [DW_FORM_exprloc] (<0x2> 8d 10 ) -; F2: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000065] = "c") +; CHECK: DW_TAG_subprogram +; CHECK: DW_AT_location [DW_FORM_exprloc] (DW_OP_breg29 SP_64+36) +; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000065] = "c") ; Function Attrs: nounwind define i32 @f2(i32 signext %a, i32 signext %b) !dbg !4 { @@ -46,9 +44,9 @@ entry: ret i32 %2, !dbg !27 } -; c -> DW_OP_breg23(r23): 16 -; F3: DW_AT_location [DW_FORM_exprloc] (<0x2> 87 10 ) -; F3: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000065] = "c") +; CHECK: DW_TAG_subprogram +; CHECK: DW_AT_location [DW_FORM_exprloc] (DW_OP_breg23 S7_64+32) +; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000065] = "c") define i32* @f3(i32 signext %a, i32 signext %b) !dbg !8 { entry: diff --git a/llvm/test/DebugInfo/Sparc/subreg.ll b/llvm/test/DebugInfo/Sparc/subreg.ll index 74475c5b0f2..720126d3227 100644 --- a/llvm/test/DebugInfo/Sparc/subreg.ll +++ b/llvm/test/DebugInfo/Sparc/subreg.ll @@ -1,7 +1,6 @@ -; RUN: llc -filetype=obj -O0 < %s -mtriple sparc64-unknown-linux-gnu | llvm-dwarfdump - | FileCheck %s +; RUN: llc -filetype=obj -O0 < %s -mtriple sparc64-unknown-linux-gnu | llvm-dwarfdump - -debug-dump=loc | FileCheck %s ; The undescribable 128-bit register should be split into two 64-bit registers. -; CHECK: Location description: 90 48 93 08 90 49 93 08 -; DW_OP_reg74 DW_OP_piece 8 DW_OP_reg75 DW_OP_piece 8 ... +; CHECK: {{.*}} - {{.*}}: DW_OP_regx D0, DW_OP_piece 0x8, DW_OP_regx D1, DW_OP_piece 0x8 target datalayout = "E-m:e-i64:64-n32:64-S128" target triple = "sparc64" diff --git a/llvm/test/DebugInfo/SystemZ/variable-loc.ll b/llvm/test/DebugInfo/SystemZ/variable-loc.ll index 1cf87a7be81..bae093afb5b 100644 --- a/llvm/test/DebugInfo/SystemZ/variable-loc.ll +++ b/llvm/test/DebugInfo/SystemZ/variable-loc.ll @@ -14,9 +14,8 @@ ; CHECK: brasl %r14, populate_array@PLT ; DEBUG: DW_TAG_variable -; Rather hard-coded, but 0x91 => DW_OP_fbreg and 0xa401 is SLEB128 encoded 164. ; DEBUG-NOT: DW_TAG -; DEBUG: DW_AT_location {{.*}}(<0x3> 91 a4 01 ) +; DEBUG: DW_AT_location {{.*}}(DW_OP_fbreg +164) ; DEBUG-NOT: DW_TAG ; DEBUG: DW_AT_name {{.*}} "main_arr" diff --git a/llvm/test/DebugInfo/X86/DW_AT_location-reference.ll b/llvm/test/DebugInfo/X86/DW_AT_location-reference.ll index af55138d43e..775e6c4d02c 100644 --- a/llvm/test/DebugInfo/X86/DW_AT_location-reference.ll +++ b/llvm/test/DebugInfo/X86/DW_AT_location-reference.ll @@ -31,22 +31,18 @@ ; // The 'x' variable and its symbol reference location ; CHECK: .debug_info contents: ; CHECK: DW_TAG_variable -; CHECK-NEXT: DW_AT_location [DW_FORM_sec_offset] (0x00000000) +; CHECK-NEXT: DW_AT_location [DW_FORM_sec_offset] (0x00000000 +; Check that the location contains only 4 ranges - this verifies that the 4th +; and 5th ranges were successfully merged into a single range. +; CHECK-NEXT: 0x{{[0-9a-f]*}} - 0x{{[0-9a-f]*}}: +; CHECK-NEXT: 0x{{[0-9a-f]*}} - 0x{{[0-9a-f]*}}: +; CHECK-NEXT: 0x{{[0-9a-f]*}} - 0x{{[0-9a-f]*}}: +; CHECK-NEXT: 0x{{[0-9a-f]*}} - 0x{{[0-9a-f]*}}: {{.*}}) ; CHECK-NEXT: DW_AT_name {{.*}} "x" ; CHECK-NEXT: DW_AT_decl_file ; CHECK-NEXT: DW_AT_decl_line ; CHECK-NEXT: DW_AT_type -; Check that the location contains only 4 ranges - this verifies that the 4th -; and 5th ranges were successfully merged into a single range. -; CHECK: .debug_loc contents: -; CHECK: 0x00000000: -; CHECK: Beginning address offset: -; CHECK: Beginning address offset: -; CHECK: Beginning address offset: -; CHECK: Beginning address offset: -; CHECK-NOT: Beginning address offset: - ; Check that we have no relocations in Darwin's output. ; DARWIN-NOT: X86_64_RELOC{{.*}} __debug_loc diff --git a/llvm/test/DebugInfo/X86/FrameIndexExprs.ll b/llvm/test/DebugInfo/X86/FrameIndexExprs.ll index 8b2cefc4f8f..dfa2bc411b6 100644 --- a/llvm/test/DebugInfo/X86/FrameIndexExprs.ll +++ b/llvm/test/DebugInfo/X86/FrameIndexExprs.ll @@ -3,8 +3,7 @@ ; RUN: llc -mtriple=x86_64-apple-darwin -filetype=obj < %s | llvm-dwarfdump -debug-dump=info - | FileCheck %s ; CHECK: DW_TAG_formal_parameter ; CHECK: DW_TAG_formal_parameter -; CHECK-NEXT: DW_AT_location [DW_FORM_exprloc] (<0xa> 91 78 93 03 93 06 91 7d 93 03 ) -; fbreg -8, piece 0x00000003, piece 0x00000006, fbreg -3, piece 0x00000003 +; CHECK-NEXT: DW_AT_location [DW_FORM_exprloc] (DW_OP_fbreg -8, DW_OP_piece 0x3, DW_OP_piece 0x6, DW_OP_fbreg -3, DW_OP_piece 0x3) ; CHECK-NEXT: DW_AT_abstract_origin {{.*}}"p" source_filename = "bugpoint-reduced-simplified.ll" target triple = "x86_64-apple-darwin" diff --git a/llvm/test/DebugInfo/X86/PR26148.ll b/llvm/test/DebugInfo/X86/PR26148.ll index 438d4785c5a..48cedc1c3a5 100644 --- a/llvm/test/DebugInfo/X86/PR26148.ll +++ b/llvm/test/DebugInfo/X86/PR26148.ll @@ -1,4 +1,4 @@ -; RUN: llc -filetype=obj -o - < %s | llvm-dwarfdump - | FileCheck %s +; RUN: llc -filetype=obj -o - < %s | llvm-dwarfdump - -debug-dump=loc | FileCheck %s ; ; Created using clang -g -O3 from: ; struct S0 { @@ -19,14 +19,8 @@ ; AS in 26163, we expect two ranges (as opposed to one), the first one being zero sized ; ; -; CHECK: Beginning address offset: 0x0000000000000004 -; CHECK: Ending address offset: 0x0000000000000004 -; CHECK: Location description: 10 03 93 04 55 93 02 -; constu 0x00000003, piece 0x00000004, rdi, piece 0x00000002 -; CHECK: Beginning address offset: 0x0000000000000004 -; CHECK: Ending address offset: 0x0000000000000014 -; CHECK: Location description: 10 03 93 04 10 00 -; constu 0x00000003, piece 0x00000004, constu 0x00000000, piece 0x00000004 +; CHECK: 0x0000000000000004 - 0x0000000000000004: DW_OP_constu 0x3, DW_OP_piece 0x4, DW_OP_reg5 RDI, DW_OP_piece 0x2 +; CHECK: 0x0000000000000004 - 0x0000000000000014: DW_OP_constu 0x3, DW_OP_piece 0x4, DW_OP_constu 0x0, DW_OP_piece 0x4 source_filename = "test/DebugInfo/X86/PR26148.ll" target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" diff --git a/llvm/test/DebugInfo/X86/array.ll b/llvm/test/DebugInfo/X86/array.ll index ed13b97794d..eba0bb48986 100644 --- a/llvm/test/DebugInfo/X86/array.ll +++ b/llvm/test/DebugInfo/X86/array.ll @@ -21,8 +21,7 @@ ; CHECK: callq _f ; DWARF: DW_TAG_variable -; "<0x2> 91 00" means fbreg 0, i.e. offset RSP+0. -; DWARF-NEXT: DW_AT_location [DW_FORM_exprloc] (<0x2> 91 00 ) +; DWARF-NEXT: DW_AT_location [DW_FORM_exprloc] (DW_OP_fbreg +0) ; DWARF-NEXT: DW_AT_name [DW_FORM_strp] ( {{.*}} = "array") ; ModuleID = '/tmp/array.c' diff --git a/llvm/test/DebugInfo/X86/bitfields.ll b/llvm/test/DebugInfo/X86/bitfields.ll index 9b327acd64a..66f61a2c464 100644 --- a/llvm/test/DebugInfo/X86/bitfields.ll +++ b/llvm/test/DebugInfo/X86/bitfields.ll @@ -19,12 +19,12 @@ ; CHECK: DW_AT_byte_size {{.*}} (0x04) ; CHECK-NEXT: DW_AT_bit_size {{.*}} (0x02) ; CHECK-NEXT: DW_AT_bit_offset {{.*}} (0x1e) -; CHECK-NEXT: DW_AT_data_member_location {{.*}} 00 +; CHECK-NEXT: DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0x0) ; CHECK: DW_TAG_member ; CHECK-NEXT: DW_AT_name{{.*}}"b" ; CHECK-NOT: DW_TAG_member -; CHECK: DW_AT_data_member_location {{.*}} 04 +; CHECK: DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0x4) ; CHECK: DW_TAG_member ; CHECK-NEXT: DW_AT_name{{.*}}"c" @@ -32,7 +32,7 @@ ; CHECK: DW_AT_byte_size {{.*}} (0x04) ; CHECK-NEXT: DW_AT_bit_size {{.*}} (0x01) ; CHECK-NEXT: DW_AT_bit_offset {{.*}} (0x1f) -; CHECK-NEXT: DW_AT_data_member_location {{.*}} 08 +; CHECK: DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0x8) ; CHECK: DW_TAG_member ; CHECK-NEXT: DW_AT_name{{.*}}"d" @@ -40,7 +40,7 @@ ; CHECK: DW_AT_byte_size {{.*}} (0x04) ; CHECK-NEXT: DW_AT_bit_size {{.*}} (0x1c) ; CHECK-NEXT: DW_AT_bit_offset {{.*}} (0x03) -; CHECK-NEXT: DW_AT_data_member_location {{.*}} 08 +; CHECK-NEXT: DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0x8) ; ModuleID = 'bitfields.c' source_filename = "test/DebugInfo/X86/bitfields.ll" diff --git a/llvm/test/DebugInfo/X86/block-capture.ll b/llvm/test/DebugInfo/X86/block-capture.ll index 7e88e839b7f..576987795c5 100644 --- a/llvm/test/DebugInfo/X86/block-capture.ll +++ b/llvm/test/DebugInfo/X86/block-capture.ll @@ -4,8 +4,7 @@ ; Checks that we emit debug info for the block variable declare. ; CHECK: DW_TAG_subprogram ; CHECK: DW_TAG_variable -; fbreg +8, deref, +32 -; CHECK-NEXT: DW_AT_location [DW_FORM_block1] (<0x05> 91 08 06 23 20 ) +; CHECK-NEXT: DW_AT_location [DW_FORM_block1] (DW_OP_fbreg +8, DW_OP_deref, DW_OP_plus_uconst 0x20) ; CHECK-NEXT: DW_AT_name {{.*}} "block" ; Extracted from the clang output for: diff --git a/llvm/test/DebugInfo/X86/constant-loclist.ll b/llvm/test/DebugInfo/X86/constant-loclist.ll index 958ccc1e985..1ab34bc5079 100644 --- a/llvm/test/DebugInfo/X86/constant-loclist.ll +++ b/llvm/test/DebugInfo/X86/constant-loclist.ll @@ -1,24 +1,22 @@ -; RUN: %llc_dwarf -filetype=obj %s -o - | llvm-dwarfdump - | FileCheck %s +; RUN: %llc_dwarf -filetype=obj %s -o - | llvm-dwarfdump -debug-dump=info - | FileCheck %s ; A hand-written testcase to check 64-bit constant handling in location lists. ; CHECK: .debug_info contents: ; CHECK: DW_TAG_variable -; CHECK-NEXT: DW_AT_location [DW_FORM_data4] (0x[[D:.*]]) +; CHECK-NEXT: DW_AT_location [DW_FORM_data4] ( +; CHECK-NEXT: 0x{{.*}} - 0x{{.*}}: DW_OP_constu 0x4000000000000000) ; CHECK-NEXT: DW_AT_name {{.*}}"d" ; CHECK: DW_TAG_variable -; CHECK-NEXT: DW_AT_location [DW_FORM_data4] (0x[[I:.*]]) +; CHECK-NEXT: DW_AT_location [DW_FORM_data4] ( +; CHECK-NEXT: 0x{{.*}} - 0x{{.*}}: DW_OP_consts +0 +; CHECK-NEXT: 0x{{.*}} - 0x{{.*}}: DW_OP_consts +4611686018427387904) ; CHECK-NEXT: DW_AT_name {{.*}}"i" ; CHECK: DW_TAG_variable -; CHECK-NEXT: DW_AT_location [DW_FORM_data4] (0x[[U:.*]]) +; CHECK-NEXT: DW_AT_location [DW_FORM_data4] ( +; CHECK-NEXT: 0x{{.*}} - 0x{{.*}}: DW_OP_constu 0x0 +; CHECK-NEXT: 0x{{.*}} - 0x{{.*}}: DW_OP_constu 0x4000000000000000) ; CHECK-NEXT: DW_AT_name {{.*}}"u" -; CHECK: .debug_loc contents: -; CHECK: [[D]]: -; CHECK: Location description: 10 80 80 80 80 80 80 80 80 40 -; CHECK: [[I]]: -; CHECK: Location description: 11 80 80 80 80 80 80 80 80 c0 00 -; CHECK: [[U]]: -; CHECK: Location description: 10 80 80 80 80 80 80 80 80 40 source_filename = "test.c" target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" diff --git a/llvm/test/DebugInfo/X86/data_member_location.ll b/llvm/test/DebugInfo/X86/data_member_location.ll index 71adcd869d8..47e1f38881c 100644 --- a/llvm/test/DebugInfo/X86/data_member_location.ll +++ b/llvm/test/DebugInfo/X86/data_member_location.ll @@ -20,11 +20,11 @@ ; DWARF2: DW_AT_name {{.*}} "c" ; DWARF2-NOT: DW_TAG -; DWARF2: DW_AT_data_member_location {{.*}} (<0x02> 23 00 ) +; DWARF2: DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0x0) ; DWARF2: DW_AT_name {{.*}} "i" ; DWARF2-NOT: DW_TAG -; DWARF2: DW_AT_data_member_location {{.*}} (<0x02> 23 04 ) +; DWARF2: DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0x4) source_filename = "test/DebugInfo/X86/data_member_location.ll" diff --git a/llvm/test/DebugInfo/X86/dbg-declare-alloca.ll b/llvm/test/DebugInfo/X86/dbg-declare-alloca.ll index 1b23604b022..2030d7c0f74 100644 --- a/llvm/test/DebugInfo/X86/dbg-declare-alloca.ll +++ b/llvm/test/DebugInfo/X86/dbg-declare-alloca.ll @@ -8,9 +8,8 @@ ; CHECK-LABEL: use_dbg_declare: ; CHECK-NOT: #DEBUG_VALUE -; "<0x2> 91 00" means "fbreg uleb(0)", i.e. RSP+0. ; DWARF: DW_TAG_variable -; DWARF-NEXT: DW_AT_location [DW_FORM_exprloc] (<0x2> 91 00 ) +; DWARF-NEXT: DW_AT_location [DW_FORM_exprloc] (DW_OP_fbreg +0) ; DWARF-NEXT: DW_AT_name [DW_FORM_strp] ( {{.*}} = "o") diff --git a/llvm/test/DebugInfo/X86/dbg-declare-arg.ll b/llvm/test/DebugInfo/X86/dbg-declare-arg.ll index ca865ab5982..73eba4bb062 100644 --- a/llvm/test/DebugInfo/X86/dbg-declare-arg.ll +++ b/llvm/test/DebugInfo/X86/dbg-declare-arg.ll @@ -5,13 +5,9 @@ target triple = "x86_64-apple-macosx10.6.7" ; ; CHECK: DW_AT_name {{.*}}"j" ; CHECK: DW_TAG_variable -; CHECK-NEXT: DW_AT_location [DW_FORM_sec_offset] (0x00000000) +; CHECK-NEXT: DW_AT_location [DW_FORM_sec_offset] ( +; CHECK-NEXT: 0x{{.*}} - 0x{{.*}}: DW_OP_breg7 RSP+8) ; CHECK-NEXT: DW_AT_name {{.*}}"my_a" -; CHECK: .debug_loc contents: -; CHECK: 0x00000000: Beginning address offset: -; CHECK-NEXT: Ending address offset: -; CHECK-NEXT: Location description: 77 08 -; rsp+8 %class.A = type { i32, i32, i32, i32 } diff --git a/llvm/test/DebugInfo/X86/dbg-declare.ll b/llvm/test/DebugInfo/X86/dbg-declare.ll index 5d81b5fc4d1..78e487d9e7e 100644 --- a/llvm/test/DebugInfo/X86/dbg-declare.ll +++ b/llvm/test/DebugInfo/X86/dbg-declare.ll @@ -8,7 +8,7 @@ ; "[DW_FORM_exprloc] <0x2> 91 XX" means fbreg uleb(XX) ; DWARF-LABEL: DW_TAG_formal_parameter -; DWARF-NEXT: DW_AT_location [DW_FORM_exprloc] (<0x2> 91 70 ) +; DWARF-NEXT: DW_AT_location [DW_FORM_exprloc] (DW_OP_fbreg -16) ; DWARF-NEXT: DW_AT_name [DW_FORM_strp] ( {{.*}} = "x") ; FIXME: There is no debug info to describe "a". diff --git a/llvm/test/DebugInfo/X86/dbg-merge-loc-entry.ll b/llvm/test/DebugInfo/X86/dbg-merge-loc-entry.ll index 447249e7479..7fa66499809 100644 --- a/llvm/test/DebugInfo/X86/dbg-merge-loc-entry.ll +++ b/llvm/test/DebugInfo/X86/dbg-merge-loc-entry.ll @@ -7,7 +7,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3 target triple = "x86_64-apple-darwin8" ; Test that consecutive, identical DBG_VALUEs are merged. -;CHECK: DW_AT_location{{.*}}(<0x1> 55 ) +; CHECK: DW_AT_location{{.*}}(DW_OP_reg5 RDI) %0 = type { i64, i1 } diff --git a/llvm/test/DebugInfo/X86/dbg-value-const-byref.ll b/llvm/test/DebugInfo/X86/dbg-value-const-byref.ll index 962113c566c..a1a468931d4 100644 --- a/llvm/test/DebugInfo/X86/dbg-value-const-byref.ll +++ b/llvm/test/DebugInfo/X86/dbg-value-const-byref.ll @@ -21,29 +21,14 @@ ; CHECK: .debug_info contents: ; CHECK: DW_TAG_variable ; CHECK-NOT: DW_TAG -; CHECK: DW_AT_location [DW_FORM_data4] ([[LOC:.*]]) +; CHECK: DW_AT_location {{.*}}({{.*}} +; CHECK-NEXT: 0x{{0*.*}} - [[C1:0x.*]]: DW_OP_consts +3 +; CHECK-NEXT: [[C1]] - [[C2:0x.*]]: DW_OP_consts +7 +; CHECK-NEXT: [[C2]] - [[R1:0x.*]]: DW_OP_reg0 RAX +; CHECK-NEXT: [[R1]] - [[R2:0x.*]]: DW_OP_breg7 RSP+4, DW_OP_deref) ; CHECK-NOT: DW_TAG ; CHECK: DW_AT_name{{.*}}"i" -; CHECK: .debug_loc contents: -; CHECK: [[LOC]]: -; consts 0x00000003 -; CHECK: Beginning address offset: 0x0000000000000{{.*}} -; CHECK: Ending address offset: [[C1:.*]] -; CHECK: Location description: 11 03 -; consts 0x00000007 -; CHECK: Beginning address offset: [[C1]] -; CHECK: Ending address offset: [[C2:.*]] -; CHECK: Location description: 11 07 -; rax -; CHECK: Beginning address offset: [[C2]] -; CHECK: Ending address offset: [[R1:.*]] -; CHECK: Location description: 50 -; rdi+0 -; CHECK: Beginning address offset: [[R1]] -; CHECK: Ending address offset: [[R2:.*]] -; CHECK: Location description: 77 04 -; rsp+4 -; + target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx10.9.0" diff --git a/llvm/test/DebugInfo/X86/dbg-value-frame-index.ll b/llvm/test/DebugInfo/X86/dbg-value-frame-index.ll index 30d91c8051e..54de99adf64 100644 --- a/llvm/test/DebugInfo/X86/dbg-value-frame-index.ll +++ b/llvm/test/DebugInfo/X86/dbg-value-frame-index.ll @@ -21,8 +21,8 @@ while.end: ; CHECK-LABEL: test ; CHECK: #DEBUG_VALUE: test:w <- [DW_OP_plus_uconst 8] [%RSP+0] -; DWARF: Location description: 77 08 -; DW_OP_breg7 +8 +; DWARF: DW_AT_location [DW_FORM_sec_offset] ( +; DWARF-NEXT: {{.*}} - {{.*}}: DW_OP_breg7 RSP+8) declare i1 @fn(i64*, i64*, i64*, i8*, i64, i64*, i32*, i8*) declare void @llvm.dbg.value(metadata, metadata, metadata) diff --git a/llvm/test/DebugInfo/X86/dbg-value-regmask-clobber.ll b/llvm/test/DebugInfo/X86/dbg-value-regmask-clobber.ll index d11b31152ab..cffb8efe259 100644 --- a/llvm/test/DebugInfo/X86/dbg-value-regmask-clobber.ll +++ b/llvm/test/DebugInfo/X86/dbg-value-regmask-clobber.ll @@ -22,14 +22,10 @@ ; argc is the first formal parameter. ; DWARF: .debug_info contents: ; DWARF: DW_TAG_formal_parameter -; DWARF-NEXT: DW_AT_location [DW_FORM_sec_offset] ([[argc_loc_offset:0x.*]]) +; DWARF-NEXT: DW_AT_location [DW_FORM_sec_offset] ({{0x.*}} +; DWARF-NEXT: 0x0000000000000000 - 0x0000000000000013: DW_OP_reg2 RCX) ; DWARF-NEXT: DW_AT_name [DW_FORM_strp] {{.*}} "argc" -; DWARF: .debug_loc contents: -; DWARF: [[argc_loc_offset]]: Beginning address offset: 0x0000000000000000 -; DWARF-NEXT: Ending address offset: 0x0000000000000013 -; DWARF-NEXT: Location description: 52 - ; ModuleID = 't.cpp' source_filename = "test/DebugInfo/X86/dbg-value-regmask-clobber.ll" target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128" diff --git a/llvm/test/DebugInfo/X86/debug-info-blocks.ll b/llvm/test/DebugInfo/X86/debug-info-blocks.ll index c16be36efe9..c19728b5bfe 100644 --- a/llvm/test/DebugInfo/X86/debug-info-blocks.ll +++ b/llvm/test/DebugInfo/X86/debug-info-blocks.ll @@ -27,10 +27,7 @@ ; CHECK-NOT: {{DW_TAG|NULL}} ; CHECK: DW_TAG_variable ; CHECK-NOT: DW_TAG -; 0x06 = DW_OP_deref -; 0x23 = DW_OP_uconst -; 0x91 = DW_OP_fbreg -; CHECK: DW_AT_location{{.*}}91 {{[0-9]+}} 06 23 {{[0-9]+}} ) +; CHECK: DW_AT_location{{.*}}(DW_OP_fbreg -24, DW_OP_deref, DW_OP_plus_uconst 0x20) ; CHECK-NOT: DW_TAG ; CHECK: DW_AT_name{{.*}}"self" ; CHECK-NOT: DW_TAG diff --git a/llvm/test/DebugInfo/X86/debug-info-packed-struct.ll b/llvm/test/DebugInfo/X86/debug-info-packed-struct.ll index 38b924ffc72..d6f23430743 100644 --- a/llvm/test/DebugInfo/X86/debug-info-packed-struct.ll +++ b/llvm/test/DebugInfo/X86/debug-info-packed-struct.ll @@ -29,15 +29,15 @@ target triple = "x86_64-apple-darwin" ; CHECK: DW_AT_byte_size {{.*}} (0x18) ; CHECK: DW_TAG_member ; CHECK: DW_AT_name {{.*}} "l0_ofs0" -; CHECK: DW_AT_data_member_location {{.*}}00 +; CHECK: DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0x0) ; CHECK: DW_TAG_member ; CHECK: DW_AT_name {{.*}} "l0_ofs8" -; CHECK: DW_AT_data_member_location {{.*}}08 +; CHECK: DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0x8) ; CHECK: DW_TAG_member ; CHECK: DW_AT_name {{.*}} "l0_ofs16" ; CHECK: DW_AT_bit_size {{.*}} (0x01) ; CHECK: DW_AT_bit_offset {{.*}} (0x1f) -; CHECK: DW_AT_data_member_location {{.*}}10 +; CHECK: DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0x10) ; // --------------------------------------------------------------------- ; // Implicitly packed. @@ -62,16 +62,16 @@ target triple = "x86_64-apple-darwin" ; CHECK: DW_AT_byte_size {{.*}} (0x0c) ; CHECK: DW_TAG_member ; CHECK: DW_AT_name {{.*}} "l1_ofs0" -; CHECK: DW_AT_data_member_location {{.*}}00 +; CHECK: DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0x0) ; CHECK: DW_TAG_member ; CHECK: DW_AT_name {{.*}} "l1_ofs1" -; CHECK: DW_AT_data_member_location {{.*}}01 +; CHECK: DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0x1) ; CHECK: DW_TAG_member ; CHECK: DW_AT_name {{.*}} "l1_ofs9" ; CHECK: DW_AT_byte_size {{.*}} (0x04) ; CHECK: DW_AT_bit_size {{.*}} (0x01) ; CHECK: DW_AT_bit_offset {{.*}} (0x17) -; CHECK: DW_AT_data_member_location {{.*}}08 +; CHECK: DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0x8) ; // --------------------------------------------------------------------- ; // Explicitly packed. @@ -95,16 +95,16 @@ target triple = "x86_64-apple-darwin" ; CHECK: DW_AT_byte_size {{.*}} (0x0a) ; CHECK: DW_TAG_member ; CHECK: DW_AT_name {{.*}} "l2_ofs0" -; CHECK: DW_AT_data_member_location {{.*}}00 +; CHECK: DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0x0) ; CHECK: DW_TAG_member ; CHECK: DW_AT_name {{.*}} "l2_ofs1" -; CHECK: DW_AT_data_member_location {{.*}}01 +; CHECK: DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0x1) ; CHECK: DW_TAG_member ; CHECK: DW_AT_name {{.*}} "l2_ofs9" ; CHECK: DW_AT_byte_size {{.*}} (0x04) ; CHECK: DW_AT_bit_size {{.*}} (0x01) ; CHECK: DW_AT_bit_offset {{.*}} (0x17) -; CHECK: DW_AT_data_member_location {{.*}}08 +; CHECK: DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0x8) ; // --------------------------------------------------------------------- ; // Explicitly packed with different alignment. @@ -128,16 +128,16 @@ target triple = "x86_64-apple-darwin" ; CHECK: DW_AT_byte_size {{.*}} (0x10) ; CHECK: DW_TAG_member ; CHECK: DW_AT_name {{.*}} "l3_ofs0" -; CHECK: DW_AT_data_member_location {{.*}}00 +; CHECK: DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0x0) ; CHECK: DW_TAG_member ; CHECK: DW_AT_name {{.*}} "l3_ofs4" -; CHECK: DW_AT_data_member_location {{.*}}04 +; CHECK: DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0x4) ; CHECK: DW_TAG_member ; CHECK: DW_AT_name {{.*}} "l3_ofs12" ; CHECK: DW_AT_byte_size {{.*}} (0x04) ; CHECK: DW_AT_bit_size {{.*}} (0x01) ; CHECK: DW_AT_bit_offset {{.*}} (0x1f) -; CHECK: DW_AT_data_member_location {{.*}}0c +; CHECK: DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0xc) !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!49, !50} diff --git a/llvm/test/DebugInfo/X86/debug-loc-asan.ll b/llvm/test/DebugInfo/X86/debug-loc-asan.ll index 00790a4f092..8bb4644d5fe 100644 --- a/llvm/test/DebugInfo/X86/debug-loc-asan.ll +++ b/llvm/test/DebugInfo/X86/debug-loc-asan.ll @@ -1,6 +1,6 @@ ; RUN: llc -O0 -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s ; RUN: llc -O0 -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %s \ -; RUN: | llvm-dwarfdump - | FileCheck %s --check-prefix=DWARF +; RUN: | llvm-dwarfdump -debug-dump=info - | FileCheck %s --check-prefix=DWARF ; Verify that we have correct debug info for local variables in code ; instrumented with AddressSanitizer. @@ -30,8 +30,9 @@ ; CHECK: .quad .Lfunc_begin0-.Lfunc_begin0 ; CHECK-NEXT: .quad [[START_LABEL]]-.Lfunc_begin0 ; CHECK: DW_OP_breg5 -; DWARF: Location description: 75 00 06 -; DW_OP_breg5+0 DW_OP_deref +; DWARF: DW_TAG_formal_parameter +; DWARF: DW_AT_location +; DWARF-NEXT: {{.*}} - {{.*}}: DW_OP_breg5 RDI+0, DW_OP_deref ; Then it's addressed via %rsp: ; CHECK: .quad [[START_LABEL]]-.Lfunc_begin0 @@ -39,8 +40,7 @@ ; CHECK: DW_OP_breg7 ; CHECK-NEXT: [[OFFSET]] ; CHECK: DW_OP_deref -; DWARF: Location description: {{77 .. 06 06}} -; DW_OP_breg7+OFFSET DW_OP_deref DW_OP_deref +; DWARF-NEXT: {{.*}} - {{.*}}: DW_OP_breg7 RSP+{{[0-9]+}}, DW_OP_deref, DW_OP_deref) ; ModuleID = 'test.cc' target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/llvm/test/DebugInfo/X86/debug-loc-frame.ll b/llvm/test/DebugInfo/X86/debug-loc-frame.ll index 047938c5e10..8c1e64a3f62 100644 --- a/llvm/test/DebugInfo/X86/debug-loc-frame.ll +++ b/llvm/test/DebugInfo/X86/debug-loc-frame.ll @@ -26,18 +26,10 @@ ; CHECK: DW_TAG_subprogram ; CHECK-NOT: NULL ; CHECK: DW_TAG_variable -; CHECK: DW_AT_location [DW_FORM_sec_offset] ([[DEBUGLOCOFFSET:0x[0-9a-f]+]]){{[[:space:]].*}}"val" - -; See that 'val' has at least one location entry with a DW_op_breg? operand. -; The DWARF DW_op_breg* ops are encoded from 0x70 to 0x8f, but checking for an -; op in the range from 0x70 to 0x7f should suffice because that range covers -; all integer GPRs. -; -; CHECK: .debug_loc contents: -; CHECK-NOT: .debug{{.*}} contents -; CHECK: [[DEBUGLOCOFFSET]]: Beginning -; CHECK-NOT: {{0x[0-9a-f]+}}: Beginning -; CHECK: Location description: 7{{[0-9a-f] .*}} +; CHECK: DW_AT_location [DW_FORM_sec_offset] ({{.*}} +; CHECK-NEXT: {{0x.*}} - {{0x.*}}: DW_OP_reg0 RAX +; CHECK-NEXT: {{0x.*}} - {{0x.*}}: DW_OP_breg7 RSP+4, DW_OP_deref) +; CHECK-NEXT: DW_AT_name {{.*}}"val" ; ModuleID = 'frame.c' source_filename = "frame.c" diff --git a/llvm/test/DebugInfo/X86/debug-loc-offset.ll b/llvm/test/DebugInfo/X86/debug-loc-offset.ll index 8f2210e2c01..6697ef3ecd6 100644 --- a/llvm/test/DebugInfo/X86/debug-loc-offset.ll +++ b/llvm/test/DebugInfo/X86/debug-loc-offset.ll @@ -23,7 +23,8 @@ ; } ; Compiled separately for i386-pc-linux-gnu and linked together. -; This ensures that we have multiple compile units so that we can verify that +; This ensures that we have multiple compile units and multiple location lists +; so that we can verify that ; debug_loc entries are relative to the low_pc of the CU. The loc entry for ; the byval argument in foo.cpp is in the second CU and so should have ; an offset relative to that CU rather than from the beginning of the text @@ -32,7 +33,7 @@ ; Checking that we have two compile units with two sets of high/lo_pc. ; CHECK: .debug_info contents ; CHECK: DW_TAG_compile_unit -; CHECK: DW_AT_low_pc +; CHECK: DW_AT_low_pc {{.*}} (0x0000000000000020) ; CHECK: DW_AT_high_pc ; CHECK: DW_TAG_subprogram @@ -41,21 +42,37 @@ ; CHECK-NOT: {{DW_TAG|NULL}} ; CHECK: DW_TAG_formal_parameter ; CHECK-NOT: DW_TAG -; CHECK: DW_AT_location [DW_FORM_sec_offset] (0x00000000) -; CHECK-NOT: DW_TAG -; CHECK: DW_AT_name [DW_FORM_strp]{{.*}}"a" +; CHECK: DW_AT_location [DW_FORM_sec_offset] ({{.*}} +; CHECK-NEXT: 0x0000000000000000 - 0x0000000000000017: DW_OP_breg0 EAX+0, DW_OP_deref +; CHECK-NEXT: 0x0000000000000017 - 0x0000000000000043: DW_OP_breg5 EBP-8, DW_OP_deref, DW_OP_deref +; CHECK-NEXT: DW_AT_name [DW_FORM_strp]{{.*}}"a" ; CHECK: DW_TAG_variable ; CHECK: DW_AT_location [DW_FORM_exprloc] ; CHECK-NOT: DW_AT_location ; CHECK: DW_TAG_compile_unit -; CHECK: DW_AT_low_pc +; CHECK: DW_AT_low_pc {{.*}} (0x0000000000000000) ; CHECK: DW_AT_high_pc +; CHECK: DW_TAG_subprogram +; CHECK-NOT: DW_TAG +; CHECK: DW_AT_linkage_name [DW_FORM_strp]{{.*}}"_Z3bari" +; CHECK-NOT: {{DW_TAG|NULL}} +; CHECK: DW_TAG_formal_parameter +; CHECK-NOT: DW_TAG +; CHECK: DW_AT_location [DW_FORM_sec_offset] ({{.*}} +; CHECK-NEXT: 0x0000000000000000 - 0x000000000000000a: DW_OP_consts +0, DW_OP_stack_value +; CHECK-NEXT: 0x000000000000000a - 0x0000000000000017: DW_OP_consts +1, DW_OP_stack_value) +; CHECK-NEXT: DW_AT_name [DW_FORM_strp]{{.*}}"b" + ; CHECK: .debug_loc contents: -; CHECK: 0x00000000: Beginning address offset: 0x0000000000000000 -; CHECK: Ending address offset: 0x0000000000000017 +; CHECK: 0x00000000: +; CHECK-NEXT: 0x0000000000000000 - 0x000000000000000a: DW_OP_consts +0, DW_OP_stack_value +; CHECK-NEXT: 0x000000000000000a - 0x0000000000000017: DW_OP_consts +1, DW_OP_stack_value +; CHECK: 0x00000022: +; CHECK-NEXT: 0x0000000000000000 - 0x0000000000000017: DW_OP_breg0 EAX+0, DW_OP_deref +; CHECK-NEXT: 0x0000000000000017 - 0x0000000000000043: DW_OP_breg5 EBP-8, DW_OP_deref, DW_OP_deref %struct.A = type { i32 (...)**, i32 } @@ -64,8 +81,9 @@ define i32 @_Z3bari(i32 %b) #0 !dbg !4 { entry: %b.addr = alloca i32, align 4 store i32 %b, i32* %b.addr, align 4 - call void @llvm.dbg.declare(metadata i32* %b.addr, metadata !21, metadata !DIExpression()), !dbg !22 + call void @llvm.dbg.value(metadata i32 0, metadata !21, metadata !DIExpression()), !dbg !22 %0 = load i32, i32* %b.addr, align 4, !dbg !23 + call void @llvm.dbg.value(metadata i32 1, metadata !21, metadata !DIExpression()), !dbg !22 %add = add nsw i32 %0, 4, !dbg !23 ret i32 %add, !dbg !23 } @@ -73,6 +91,8 @@ entry: ; Function Attrs: nounwind readnone declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + define void @_Z3baz1A(%struct.A* %a) #2 !dbg !14 { entry: %z = alloca i32, align 4 diff --git a/llvm/test/DebugInfo/X86/dw_op_minus_direct.ll b/llvm/test/DebugInfo/X86/dw_op_minus_direct.ll index a68bc8b8726..362a8c35121 100644 --- a/llvm/test/DebugInfo/X86/dw_op_minus_direct.ll +++ b/llvm/test/DebugInfo/X86/dw_op_minus_direct.ll @@ -13,12 +13,13 @@ ; DWARF2: .debug_info ; DWARF2: DW_TAG_formal_parameter ; DWARF2-NEXT: DW_AT_name {{.*}}"i" -; DWARF2-NOT: DW_AT_location +; DWARF2-NOT: DW_AT_location -; CHECK: Beginning address offset: 0x0000000000000000 -; CHECK: Ending address offset: 0x0000000000000004 -; CHECK: Location description: 70 00 10 ff ff ff ff 0f 1a 10 01 1c 9f +; CHECK: .debug_loc contents: +; CHECK: 0x00000000: +; CHECK-NEXT: 0x0000000000000000 - 0x0000000000000004: DW_OP_breg0 RAX+0, DW_OP_constu 0xffffffff, DW_OP_and, DW_OP_constu 0x1, DW_OP_minus, DW_OP_stack_value ; rax+0, constu 0xffffffff, and, constu 0x00000001, minus, stack-value + source_filename = "minus.c" target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx10.12.0" diff --git a/llvm/test/DebugInfo/X86/fi-expr.ll b/llvm/test/DebugInfo/X86/fi-expr.ll index cf240505c0c..903cb56c674 100644 --- a/llvm/test/DebugInfo/X86/fi-expr.ll +++ b/llvm/test/DebugInfo/X86/fi-expr.ll @@ -3,8 +3,9 @@ ; A hand-crafted FrameIndex location with a DW_OP_deref. ; CHECK: DW_TAG_formal_parameter ; fbreg -8, deref -; CHECK-NEXT: DW_AT_location {{.*}} (<0x3> 91 78 06 ) +; CHECK-NEXT: DW_AT_location {{.*}} (DW_OP_fbreg -8, DW_OP_deref) ; CHECK-NEXT: DW_AT_name {{.*}} "foo" + define void @f(i8* %bar) !dbg !6 { entry: %foo.addr = alloca i8* diff --git a/llvm/test/DebugInfo/X86/fi-piece.ll b/llvm/test/DebugInfo/X86/fi-piece.ll index 25bf4533fe8..2166157364b 100644 --- a/llvm/test/DebugInfo/X86/fi-piece.ll +++ b/llvm/test/DebugInfo/X86/fi-piece.ll @@ -5,8 +5,7 @@ ; CHECK: DW_TAG_subprogram ; CHECK: DW_AT_abstract_origin ; CHECK: DW_TAG_variable -; CHECK-NEXT: DW_AT_location [DW_FORM_exprloc] (<0x8> 91 7c 93 02 91 78 93 02 ) -; fbreg -8, piece 0x00000002, fbreg -4, piece 0x00000002 +; CHECK-NEXT: DW_AT_location [DW_FORM_exprloc] (DW_OP_fbreg -4, DW_OP_piece 0x2, DW_OP_fbreg -8, DW_OP_piece 0x2) ; CHECK-NEXT: DW_AT_abstract_origin {{.*}}"a" ; Inlined variable, not to be merged. ; CHECK-NOT: DW_TAG diff --git a/llvm/test/DebugInfo/X86/fission-cu.ll b/llvm/test/DebugInfo/X86/fission-cu.ll index 51f4584a282..98f800a4f97 100644 --- a/llvm/test/DebugInfo/X86/fission-cu.ll +++ b/llvm/test/DebugInfo/X86/fission-cu.ll @@ -79,7 +79,7 @@ source_filename = "test/DebugInfo/X86/fission-cu.ll" ; CHECK: DW_AT_external [DW_FORM_flag_present] (true) ; CHECK: DW_AT_decl_file [DW_FORM_data1] (0x01) ; CHECK: DW_AT_decl_line [DW_FORM_data1] (1) -; CHECK: DW_AT_location [DW_FORM_exprloc] (<0x2> fb 00 ) +; CHECK: DW_AT_location [DW_FORM_exprloc] (DW_OP_GNU_addr_index 0x0) ; CHECK: [[TYPE]]: DW_TAG_base_type ; CHECK: DW_AT_name [DW_FORM_GNU_str_index] ( indexed (00000004) string = "int") diff --git a/llvm/test/DebugInfo/X86/fission-ranges.ll b/llvm/test/DebugInfo/X86/fission-ranges.ll index 04521704b0d..21add33a1dd 100644 --- a/llvm/test/DebugInfo/X86/fission-ranges.ll +++ b/llvm/test/DebugInfo/X86/fission-ranges.ll @@ -12,10 +12,10 @@ ; CHECK: .debug_info.dwo contents: -; CHECK: DW_AT_location [DW_FORM_sec_offset] ([[A:0x[0-9a-z]*]]) -; CHECK: DW_AT_location [DW_FORM_sec_offset] ([[E:0x[0-9a-z]*]]) -; CHECK: DW_AT_location [DW_FORM_sec_offset] ([[B:0x[0-9a-z]*]]) -; CHECK: DW_AT_location [DW_FORM_sec_offset] ([[D:0x[0-9a-z]*]]) +; CHECK: DW_AT_location [DW_FORM_sec_offset] ([[A:0x[0-9a-z]*]] +; CHECK: DW_AT_location [DW_FORM_sec_offset] ([[E:0x[0-9a-z]*]] +; CHECK: DW_AT_location [DW_FORM_sec_offset] ([[B:0x[0-9a-z]*]] +; CHECK: DW_AT_location [DW_FORM_sec_offset] ([[D:0x[0-9a-z]*]] ; CHECK: DW_AT_ranges [DW_FORM_sec_offset] (0x00000000 ; CHECK: .debug_loc contents: ; CHECK-NOT: Beginning address offset @@ -24,22 +24,16 @@ ; Don't assume these locations are entirely correct - feel free to update them ; if they've changed due to a bugfix, change in register allocation, etc. -; CHECK: [[A]]: Beginning address index: 2 -; CHECK-NEXT: Length: 169 -; CHECK-NEXT: Location description: 11 00 -; CHECK-NEXT: {{^$}} -; CHECK-NEXT: Beginning address index: 3 -; CHECK-NEXT: Length: 25 -; CHECK-NEXT: Location description: 50 -; CHECK: [[E]]: Beginning address index: 4 -; CHECK-NEXT: Length: 19 -; CHECK-NEXT: Location description: 50 -; CHECK: [[B]]: Beginning address index: 5 -; CHECK-NEXT: Length: 17 -; CHECK-NEXT: Location description: 50 -; CHECK: [[D]]: Beginning address index: 6 -; CHECK-NEXT: Length: 17 -; CHECK-NEXT: Location description: 50 +; CHECK: [[A]]: +; CHECK-NEXT: Addr idx 2 (w/ length 169): DW_OP_consts +0, DW_OP_stack_value +; CHECK-NEXT: Addr idx 3 (w/ length 25): DW_OP_reg0 RAX +; CHECK: [[E]]: +; CHECK-NEXT: Addr idx 4 (w/ length 19): DW_OP_reg0 RAX +; CHECK: [[B]]: +; CHECK-NEXT: Addr idx 5 (w/ length 17): DW_OP_reg0 RAX +; CHECK: [[D]]: +; CHECK-NEXT: Addr idx 6 (w/ length 17): DW_OP_reg0 RAX + ; Make sure we don't produce any relocations in any .dwo section (though in particular, debug_info.dwo) ; HDR-NOT: .rela.{{.*}}.dwo diff --git a/llvm/test/DebugInfo/X86/float_const_loclist.ll b/llvm/test/DebugInfo/X86/float_const_loclist.ll index 430e2ef3b30..68ca98dd917 100644 --- a/llvm/test/DebugInfo/X86/float_const_loclist.ll +++ b/llvm/test/DebugInfo/X86/float_const_loclist.ll @@ -20,21 +20,14 @@ ; ; CHECK: .debug_info contents: ; CHECK: DW_TAG_variable -; CHECK-NEXT: DW_AT_location {{.*}} (0x[[LD:.*]]) +; CHECK-NEXT: DW_AT_location {{.*}} ( +; CHECK-NEXT: [[START:0x.*]] - [[END:0x.*]]: DW_OP_constu 0xc8f5c28f5c28f800, DW_OP_piece 0x8, DW_OP_constu 0x4000, DW_OP_bit_piece 0x10 0x40) ; CHECK-NEXT: DW_AT_name {{.*}}"ld" ; CHECK: DW_TAG_variable -; CHECK-NEXT: DW_AT_location {{.*}} (0x[[F:.*]]) +; CHECK-NEXT: DW_AT_location {{.*}} ( +; CHECK-NEXT: [[START]] - [[END]]: DW_OP_constu 0x4048f5c3) ; CHECK-NEXT: DW_AT_name {{.*}}"f" -; -; CHECK: .debug_loc contents: -; CHECK: [[LD]]: Beginning address offset: [[START:.*]] -; CHECK: Ending address offset: [[END:.*]] -; CHECK: Location description: 10 80 f0 a3 e1 f5 d1 f0 fa c8 01 93 08 10 80 80 01 9d 10 40 -; constu 0xc8f5c28f5c28f800, piece 8, constu 0x00004000, bit-piece 16 64 -; CHECK: [[F]]: Beginning address offset: [[START]] -; CHECK: Ending address offset: [[END]] -; CHECK: Location description: 10 c3 eb a3 82 04 -; constu ... + source_filename = "test.c" target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx10.11.0" diff --git a/llvm/test/DebugInfo/X86/frame-register.ll b/llvm/test/DebugInfo/X86/frame-register.ll index 0c972b70703..cdd6ed33fa0 100644 --- a/llvm/test/DebugInfo/X86/frame-register.ll +++ b/llvm/test/DebugInfo/X86/frame-register.ll @@ -1,7 +1,6 @@ ; RUN: llc %s -filetype=obj -o - | llvm-dwarfdump --debug-dump=info - | FileCheck %s ; CHECK: DW_TAG_variable -; DW_OP_fbreg -; CHECK-NEXT: DW_AT_location [DW_FORM_exprloc] (<0x2> 91 00 ) +; CHECK-NEXT: DW_AT_location [DW_FORM_exprloc] (DW_OP_fbreg +0) ; CHECK-NEXT: DW_AT_name {{.*}}"i" target datalayout = "e-m:e-p:32:32-i64:64-f80:128-n8:16:32:64-S128" diff --git a/llvm/test/DebugInfo/X86/inlined-formal-parameter.ll b/llvm/test/DebugInfo/X86/inlined-formal-parameter.ll index 86b03a8f300..2d002e87431 100644 --- a/llvm/test/DebugInfo/X86/inlined-formal-parameter.ll +++ b/llvm/test/DebugInfo/X86/inlined-formal-parameter.ll @@ -19,11 +19,10 @@ ; CHECK: DW_TAG_inlined_subroutine ; CHECK-NEXT: DW_AT_abstract_origin {{.*}} "bar" ; CHECK: DW_TAG_formal_parameter -; CHECK-NEXT: DW_AT_location [DW_FORM_data4] (0x00000000) +; CHECK-NEXT: DW_AT_location [DW_FORM_data4] ( +; CHECK-NEXT: {{.*}} - {{.*}}: DW_OP_consts +0) ; CHECK-NEXT: DW_AT_abstract_origin {{.*}} "a" -; -; CHECK: .debug_loc -; CHECK: Location description: 11 00 + target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-darwin" diff --git a/llvm/test/DebugInfo/X86/live-debug-variables.ll b/llvm/test/DebugInfo/X86/live-debug-variables.ll index 5fa7766b1aa..90d5b0b54d5 100644 --- a/llvm/test/DebugInfo/X86/live-debug-variables.ll +++ b/llvm/test/DebugInfo/X86/live-debug-variables.ll @@ -22,8 +22,11 @@ ; F(a,b,c,d,e); ; } -; CHECK: Beginning address offset -; CHECK-NOT: Beginning address offset +; CHECK: .debug_loc contents: +; CHECK-NEXT: 0x00000000: +; CHECK-NEXT: 0x000000000000001f - 0x000000000000003c: DW_OP_reg3 RBX +; We should only have one entry +; CHECK-NOT: : declare i32 @foobar(i32, i32, i32, i32, i32) diff --git a/llvm/test/DebugInfo/X86/op_deref.ll b/llvm/test/DebugInfo/X86/op_deref.ll index 2d375352f6f..d9a019c4a5c 100644 --- a/llvm/test/DebugInfo/X86/op_deref.ll +++ b/llvm/test/DebugInfo/X86/op_deref.ll @@ -5,19 +5,16 @@ ; RUN: | llvm-dwarfdump -debug-dump=info - \ ; RUN: | FileCheck %s -check-prefix=CHECK -check-prefix=DWARF3 -; FIXME: The location here needs to be fixed, but llvm-dwarfdump doesn't handle -; DW_AT_location lists yet. -; DWARF4: DW_AT_location [DW_FORM_sec_offset] (0x00000000) +; DWARF4: DW_AT_location [DW_FORM_sec_offset] (0x00000000 +; DWARF4-NEXT: {{.*}}: DW_OP_breg2 RCX+0, DW_OP_deref -; FIXME: The location here needs to be fixed, but llvm-dwarfdump doesn't handle -; DW_AT_location lists yet. -; DWARF3: DW_AT_location [DW_FORM_data4] (0x00000000) +; DWARF3: DW_AT_location [DW_FORM_data4] (0x00000000 +; DWARF3-NEXT: {{.*}}: DW_OP_breg2 RCX+0, DW_OP_deref ; CHECK-NOT: DW_TAG ; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000067] = "vla") -; Unfortunately llvm-dwarfdump can't unparse a list of DW_AT_locations -; right now, so we check the asm output: +; Check the DEBUG_VALUE comments for good measure. ; RUN: llc -O0 -mtriple=x86_64-apple-darwin %s -o - -filetype=asm | FileCheck %s -check-prefix=ASM-CHECK ; vla should have a register-indirect address at one point. ; ASM-CHECK: DEBUG_VALUE: vla <- [DW_OP_deref] [%RCX+0] diff --git a/llvm/test/DebugInfo/X86/parameters.ll b/llvm/test/DebugInfo/X86/parameters.ll index 26fb82df1f3..9983509a115 100644 --- a/llvm/test/DebugInfo/X86/parameters.ll +++ b/llvm/test/DebugInfo/X86/parameters.ll @@ -1,7 +1,7 @@ ; REQUIRES: object-emission ; ; RUN: llc -mtriple=x86_64-unknown-linux-gnu -O0 -filetype=obj < %s > %t -; RUN: llvm-dwarfdump %t | FileCheck %s +; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s ; Test case derived from compiling the following source with clang -g: ; @@ -23,21 +23,25 @@ ; } ; CHECK: debug_info contents -; 0x74 is DW_OP_breg4, showing that the parameter is accessed indirectly -; (with a zero offset) from the register parameter. -; CHECK: DW_AT_location {{.*}} 74 00 06 - +; The parameter is accessed indirectly (with a zero offset) from the second +; register parameter. RDI is consumed by 'sret'. +; CHECK: DW_TAG_subprogram +; CHECK: DW_AT_name{{.*}} = "func" +; CHECK: DW_TAG_formal_parameter +; CHECK: DW_AT_location {{.*}} (DW_OP_breg4 RSI+0, DW_OP_deref) ; CHECK-NOT: DW_TAG ; CHECK: DW_AT_name{{.*}} = "f" -; -; CHECK: DW_AT_location{{.*}}([[G_LOC:0x[0-9]*]]) + +; CHECK: DW_TAG_subprogram +; CHECK: DW_AT_name{{.*}} = "func2" +; CHECK: DW_TAG_formal_parameter +; CHECK: DW_AT_location{{.*}}(DW_OP_fbreg +23) +; CHECK: DW_TAG_formal_parameter +; CHECK: DW_AT_location{{.*}}( +; CHECK-NEXT: {{.*}}: DW_OP_breg4 RSI+0, DW_OP_deref +; CHECK-NEXT: {{.*}}: DW_OP_breg7 RSP+8, DW_OP_deref, DW_OP_deref) ; CHECK-NOT: DW_TAG ; CHECK: DW_AT_name{{.*}} = "g" -; -; CHECK: debug_loc contents -; CHECK: [[G_LOC]]: Beginning -; CHECK-NEXT: Ending -; CHECK-NEXT: Location description: 74 00 %"struct.pr14763::foo" = type { i8 } diff --git a/llvm/test/DebugInfo/X86/partial-constant.ll b/llvm/test/DebugInfo/X86/partial-constant.ll index f1ab2cb28bb..1cabaabd803 100644 --- a/llvm/test/DebugInfo/X86/partial-constant.ll +++ b/llvm/test/DebugInfo/X86/partial-constant.ll @@ -16,9 +16,10 @@ ; ; The constant should NOT be available for the entire function. ; CHECK-NOT: DW_AT_const_value -; CHECK: .debug_loc -; CHECK: Location description: 10 01 9f -; constu 0x00000001, stack-value +; CHECK: .debug_loc contents: +; CHECK-NEXT: 0x00000000: +; CHECK-NEXT: {{.*}}: DW_OP_constu 0x1, DW_OP_stack_value + source_filename = "test.ii" target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx10.12.0" diff --git a/llvm/test/DebugInfo/X86/pieces-1.ll b/llvm/test/DebugInfo/X86/pieces-1.ll index ed0b9c6c825..609f92df410 100644 --- a/llvm/test/DebugInfo/X86/pieces-1.ll +++ b/llvm/test/DebugInfo/X86/pieces-1.ll @@ -17,14 +17,9 @@ ; CHECK: .debug_loc contents: ; -; 0x0000000000000000 - 0x0000000000000006: rdi, piece 0x00000008, rsi, piece 0x00000004 -; CHECK: Beginning address offset: 0x0000000000000000 -; CHECK: Ending address offset: [[LTMP3:.*]] -; CHECK: Location description: 55 93 08 54 93 04 -; 0x0000000000000006 - 0x0000000000000008: rbp-8, piece 0x00000008, rax, piece 0x00000004 ) -; CHECK: Beginning address offset: [[LTMP3]] -; CHECK: Ending address offset: [[END:.*]] -; CHECK: Location description: 76 78 93 08 54 93 04 +; CHECK: 0x0000000000000000 - [[LTMP3:.*]]: DW_OP_reg5 RDI, DW_OP_piece 0x8, DW_OP_reg4 RSI, DW_OP_piece 0x4 +; 0x0000000000000006 - 0x0000000000000008: rbp-8, piece 0x8, rax, piece 0x4 ) +; CHECK: [[LTMP3]] - {{.*}}: DW_OP_breg6 RBP-8, DW_OP_piece 0x8, DW_OP_reg4 RSI, DW_OP_piece 0x4 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx10.9.0" diff --git a/llvm/test/DebugInfo/X86/pieces-2.ll b/llvm/test/DebugInfo/X86/pieces-2.ll index a472b69abce..e9728580458 100644 --- a/llvm/test/DebugInfo/X86/pieces-2.ll +++ b/llvm/test/DebugInfo/X86/pieces-2.ll @@ -17,15 +17,10 @@ ; ; ; CHECK: DW_TAG_variable [4] -; CHECK-NEXT: DW_AT_location [DW_FORM_data4] ([[LOC:.*]]) +; CHECK-NEXT: DW_AT_location [DW_FORM_data4] ( +; CHECK-NEXT: 0x0000000000000004 - 0x0000000000000005: DW_OP_reg0 RAX, DW_OP_piece 0x4) ; CHECK-NEXT: DW_AT_name {{.*}}"i1" -; -; CHECK: .debug_loc -; CHECK: [[LOC]]: Beginning address offset: 0x0000000000000004 -; CHECK-NEXT: Ending address offset: 0x0000000000000005 -; rax, piece 0x00000004 -; CHECK-NEXT: Location description: 50 93 04 -; + ; ModuleID = '/Volumes/Data/llvm/test/DebugInfo/X86/sroasplit-1.ll' target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx10.9.0" diff --git a/llvm/test/DebugInfo/X86/pieces-3.ll b/llvm/test/DebugInfo/X86/pieces-3.ll index 6685a62ab1e..8131afd0d31 100644 --- a/llvm/test/DebugInfo/X86/pieces-3.ll +++ b/llvm/test/DebugInfo/X86/pieces-3.ll @@ -16,26 +16,14 @@ ; } ; ; CHECK: DW_TAG_formal_parameter [3] -; CHECK-NEXT: DW_AT_location [DW_FORM_data4] ([[LOC1:.*]]) +; CHECK-NEXT: DW_AT_location [DW_FORM_data4] ( +; CHECK-NEXT: 0x0000000000000000 - 0x0000000000000004: DW_OP_reg5 RDI, DW_OP_piece 0x8, DW_OP_piece 0x4, DW_OP_reg4 RSI, DW_OP_piece 0x4 +; CHECK-NEXT: 0x0000000000000004 - 0x0000000000000008: DW_OP_reg5 RDI, DW_OP_piece 0x8, DW_OP_piece 0x4, DW_OP_reg4 RSI, DW_OP_piece 0x4) ; CHECK-NEXT: DW_AT_name {{.*}}"outer" ; CHECK: DW_TAG_variable -; CHECK-NEXT: DW_AT_location -; rsi, piece 0x00000004 -; CHECK-SAME: 54 93 04 +; CHECK-NEXT: DW_AT_location {{.*}}(DW_OP_reg4 RSI, DW_OP_piece 0x4) ; CHECK-NEXT: "i1" -; -; CHECK: .debug_loc -; CHECK: [[LOC1]]: Beginning address offset: 0x0000000000000000 -; CHECK-NEXT: Ending address offset: 0x0000000000000004 -; rdi, piece 0x00000008, piece 0x00000004, rsi, piece 0x00000004 -; CHECK-NEXT: Location description: 55 93 08 93 04 54 93 04 -; This location is split into two ranges with identical locations -; because it comes from a DBG_VALUE %RSI followed by a DBG_VALUE %ESI. -; CHECK: Beginning address offset: 0x0000000000000004 -; CHECK-NEXT: Ending address offset: 0x0000000000000008 -; CHECK-NEXT: Location description: 55 93 08 93 04 54 93 04 -; ; ModuleID = '/Volumes/Data/llvm/test/DebugInfo/X86/sroasplit-2.ll' target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx10.9.0" diff --git a/llvm/test/DebugInfo/X86/pieces-4.ll b/llvm/test/DebugInfo/X86/pieces-4.ll index c210272ed29..860255d1fe0 100644 --- a/llvm/test/DebugInfo/X86/pieces-4.ll +++ b/llvm/test/DebugInfo/X86/pieces-4.ll @@ -1,5 +1,5 @@ ; RUN: llc < %s | FileCheck %s -; RUN: llc -filetype=obj < %s | llvm-dwarfdump - | FileCheck %s --check-prefix=DWARF +; RUN: llc -filetype=obj < %s | llvm-dwarfdump -debug-dump=loc - | FileCheck %s --check-prefix=DWARF ; Compile the following with -O1: @@ -22,8 +22,10 @@ ; CHECK: #NO_APP ; CHECK: movl [[offs]](%rsp), %eax # 4-byte Reload ; CHECK: retq -; DWARF: Location description: {{77 .. 93 04 10 00 9f 93 04}} -; DW_OP_breg7+offs DW_OP_piece 4 DW_OP_constu 0 DW_OP_stack_value DW_OP_piece 4 + +; DWARF: .debug_loc contents: +; DWARF-NEXT: 0x00000000: +; DWARF-NEXT: {{.*}}: DW_OP_breg7 RSP+{{[0-9]+}}, DW_OP_piece 0x4, DW_OP_constu 0x0, DW_OP_stack_value, DW_OP_piece 0x4 ; ModuleID = 't.c' source_filename = "t.c" diff --git a/llvm/test/DebugInfo/X86/reference-argument.ll b/llvm/test/DebugInfo/X86/reference-argument.ll index 74846e7a971..47cbd688a88 100644 --- a/llvm/test/DebugInfo/X86/reference-argument.ll +++ b/llvm/test/DebugInfo/X86/reference-argument.ll @@ -12,9 +12,7 @@ ; CHECK: DW_AT_name {{.*}} "this" ; CHECK-NOT: DW_TAG_subprogram ; CHECK: DW_TAG_formal_parameter -; CHECK-NEXT: DW_AT_location -; rsi+0 -; CHECK-SAME: 74 00 +; CHECK-NEXT: DW_AT_location {{.*}}(DW_OP_breg4 RSI+0) ; CHECK-NEXT: DW_AT_name {{.*}} "v" target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" diff --git a/llvm/test/DebugInfo/X86/single-dbg_value.ll b/llvm/test/DebugInfo/X86/single-dbg_value.ll index d6c5aadd846..9757f537518 100644 --- a/llvm/test/DebugInfo/X86/single-dbg_value.ll +++ b/llvm/test/DebugInfo/X86/single-dbg_value.ll @@ -5,14 +5,13 @@ ; ; CHECK: .debug_info contents: ; CHECK: DW_TAG_variable -; CHECK-NEXT: DW_AT_location [DW_FORM_data4] +; CHECK-NEXT: DW_AT_location [DW_FORM_data4] ( +; CHECK-NEXT: {{.*}}: DW_OP_reg0 RAX) ; CHECK-NEXT: DW_AT_name{{.*}}"a" -; CHECK: .debug_loc contents: -; rax -; CHECK: Location description: 50 + ; SANITY: DBG_VALUE ; SANITY-NOT: DBG_VALUE -; ModuleID = 'test.ll' + ; Compiled with -O: ; void h(int); ; int g(); @@ -21,6 +20,8 @@ ; int a = g(); ; h(a); ; } + +; ModuleID = 'test.ll' target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx" diff --git a/llvm/test/DebugInfo/X86/single-fi.ll b/llvm/test/DebugInfo/X86/single-fi.ll index 1de4a3bac59..69a7b358efb 100644 --- a/llvm/test/DebugInfo/X86/single-fi.ll +++ b/llvm/test/DebugInfo/X86/single-fi.ll @@ -3,7 +3,7 @@ ; A single FI location. This used to trigger an assertion in debug libstdc++. ; CHECK: DW_TAG_formal_parameter ; fbreg -8 -; CHECK-NEXT: DW_AT_location {{.*}} (<0x2> 91 78 ) +; CHECK-NEXT: DW_AT_location {{.*}} (DW_OP_fbreg -8) ; CHECK-NEXT: DW_AT_name {{.*}} "dipsy" define void @tinkywinky(i8* %dipsy) !dbg !6 { entry: diff --git a/llvm/test/DebugInfo/X86/split-global.ll b/llvm/test/DebugInfo/X86/split-global.ll index 6a80db5dd7a..6e1fc05a84f 100644 --- a/llvm/test/DebugInfo/X86/split-global.ll +++ b/llvm/test/DebugInfo/X86/split-global.ll @@ -11,21 +11,19 @@ target triple = "x86_64-apple-macosx10.12.0" ; CHECK: DW_TAG_variable ; CHECK-NEXT: DW_AT_name {{.*}}"point" ; CHECK-NOT: DW_TAG -; CHECK: DW_AT_location [DW_FORM_exprloc] (<0x16> 03 04 00 00 00 00 00 00 00 93 04 03 00 00 00 00 00 00 00 00 93 04 ) -; [0x0000000000000004], piece 0x00000004, [0x0000000000000000], piece 0x00000004 +; CHECK: DW_AT_location [DW_FORM_exprloc] (DW_OP_addr 0x4, DW_OP_piece 0x4, DW_OP_addr 0x0, DW_OP_piece 0x4) ; CHECK-NOT: DW_TAG ; CHECK: DW_TAG ; CHECK: DW_TAG_variable ; CHECK-NEXT: DW_AT_name {{.*}}"part_const" ; CHECK-NOT: DW_TAG -; CHECK: DW_AT_location [DW_FORM_exprloc] (<0x10> 03 08 00 00 00 00 00 00 00 93 04 10 02 9f 93 04 ) +; CHECK: DW_AT_location [DW_FORM_exprloc] (DW_OP_addr 0x8, DW_OP_piece 0x4, DW_OP_constu 0x2, DW_OP_stack_value, DW_OP_piece 0x4) ; [0x0000000000000008], piece 0x00000004, constu 0x00000002, stack-value, piece 0x00000004 ; CHECK-NOT: DW_TAG ; CHECK: DW_TAG_variable ; CHECK-NEXT: DW_AT_name {{.*}}"full_const" ; CHECK-NOT: DW_TAG -; CHECK: DW_AT_location [DW_FORM_exprloc] (<0xa> 10 01 9f 93 04 10 02 9f 93 04 ) -; constu 0x00000001, stack-value, piece 0x00000004, constu 0x00000002, stack-value, piece 0x00000004 +; CHECK: DW_AT_location [DW_FORM_exprloc] (DW_OP_constu 0x1, DW_OP_stack_value, DW_OP_piece 0x4, DW_OP_constu 0x2, DW_OP_stack_value, DW_OP_piece 0x4) ; CHECK-NOT: DW_TAG @point.y = global i32 2, align 4, !dbg !13 @point.x = global i32 1, align 4, !dbg !12 diff --git a/llvm/test/DebugInfo/X86/sret.ll b/llvm/test/DebugInfo/X86/sret.ll index 152a1b9bfd9..96ed7a92a92 100644 --- a/llvm/test/DebugInfo/X86/sret.ll +++ b/llvm/test/DebugInfo/X86/sret.ll @@ -10,13 +10,10 @@ ; RUN: llc -O0 -fast-isel=false -mtriple=x86_64-apple-darwin -filetype=obj -o - %s | llvm-dwarfdump - | FileCheck %s ; CHECK: _ZN1B9AInstanceEv ; CHECK: DW_TAG_variable -; CHECK-NEXT: DW_AT_location [DW_FORM_sec_offset] (0x00000000) +; CHECK-NEXT: DW_AT_location [DW_FORM_sec_offset] (0x00000000 +; CHECK-NEXT: {{.*}} - {{.*}}: DW_OP_breg5 RDI+0 +; CHECK-NEXT: {{.*}} - {{.*}}: DW_OP_breg6 RBP-24, DW_OP_deref) ; CHECK-NEXT: DW_AT_name {{.*}}"a" -; CHECK: .debug_loc contents: -; CHECK: 0x00000000: Beginning address offset: -; CHECK-NEXT: Ending address offset: -; CHECK-NEXT: Location description: 75 00 -; rdi+0 %class.A = type { i32 (...)**, i32 } %class.B = type { i8 } diff --git a/llvm/test/DebugInfo/X86/stack-value-dwarf2.ll b/llvm/test/DebugInfo/X86/stack-value-dwarf2.ll index c5ebacc392c..f7cc2518e65 100644 --- a/llvm/test/DebugInfo/X86/stack-value-dwarf2.ll +++ b/llvm/test/DebugInfo/X86/stack-value-dwarf2.ll @@ -1,7 +1,8 @@ -; RUN: llc -filetype=obj -o - %s | llvm-dwarfdump - | FileCheck %s +; RUN: llc -filetype=obj -o - %s | llvm-dwarfdump -debug-dump=loc - | FileCheck %s + ; Note that it would be even better to avoid emitting the empty piece. -; CHECK: Location description: 93 08 -; piece 0x00000008 +; CHECK: {{.*}}: DW_OP_piece 0x8{{$}} + source_filename = "bugpoint-reduced-simplified.ll" target triple = "i386-apple-ios7.0.0" diff --git a/llvm/test/DebugInfo/X86/stack-value-piece.ll b/llvm/test/DebugInfo/X86/stack-value-piece.ll index 79a57859938..150db8219b4 100644 --- a/llvm/test/DebugInfo/X86/stack-value-piece.ll +++ b/llvm/test/DebugInfo/X86/stack-value-piece.ll @@ -18,25 +18,22 @@ ; CHECK: DW_TAG_subprogram ; CHECK: DW_AT_name {{.*}} "i" ; CHECK: DW_TAG_variable -; CHECK-NEXT: DW_AT_location {{.*}} ([[I:.*]]) +; CHECK-NEXT: DW_AT_location {{.*}} ([[I:.*]] +; CHECK-NEXT: {{.*}} - {{.*}}: DW_OP_reg5 RDI, DW_OP_piece 0x4, DW_OP_constu 0x0, DW_OP_stack_value, DW_OP_piece 0x4) ; CHECK-NEXT: DW_AT_name {{.*}} "r" ; ; CHECK: DW_TAG_subprogram ; CHECK: DW_AT_name {{.*}} "f" ; CHECK: DW_TAG_variable -; CHECK-NEXT: DW_AT_location {{.*}} ([[F:.*]]) +; CHECK-NEXT: DW_AT_location {{.*}} ([[F:.*]] +; CHECK-NEXT: {{.*}} - {{.*}}: DW_OP_reg17 XMM0, DW_OP_piece 0x4, DW_OP_constu 0x0, DW_OP_stack_value, DW_OP_piece 0x4) ; CHECK-NEXT: DW_AT_name {{.*}} "r" ; ; CHECK: .debug_loc contents: -; CHECK: [[I]]: Beginning address offset: -; CHECK-NEXT: Ending address offset: -; CHECK-NEXT: Location description: 55 93 04 10 00 9f 93 04 -; rdi, piece 0x00000004, constu 0x00000000, stack-value, piece 0x00000004 -; -; CHECK: [[F]]: Beginning address offset: -; CHECK-NEXT: Ending address offset: -; CHECK-NEXT: Location description: 61 93 04 10 00 9f 93 04 -; reg17, piece 0x00000004, constu 0x00000000, stack-value, piece 0x00000004 +; CHECK: [[I]]: +; CHECK-NEXT: {{.*}} - {{.*}}: DW_OP_reg5 RDI, DW_OP_piece 0x4, DW_OP_constu 0x0, DW_OP_stack_value, DW_OP_piece 0x4 +; CHECK: [[F]]: +; CHECK-NEXT: {{.*}} - {{.*}}: DW_OP_reg17 XMM0, DW_OP_piece 0x4, DW_OP_constu 0x0, DW_OP_stack_value, DW_OP_piece 0x4 source_filename = "stack-value-piece.c" target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" diff --git a/llvm/test/DebugInfo/X86/subregisters.ll b/llvm/test/DebugInfo/X86/subregisters.ll index f44653d9a2c..3277673f14b 100644 --- a/llvm/test/DebugInfo/X86/subregisters.ll +++ b/llvm/test/DebugInfo/X86/subregisters.ll @@ -8,11 +8,9 @@ ; ; CHECK: .debug_info contents: ; CHECK: DW_TAG_variable -; CHECK-NEXT: DW_AT_location [DW_FORM_data4] (0x00000000) +; CHECK-NEXT: DW_AT_location [DW_FORM_data4] ( +; CHECK-NEXT: {{.*}} - {{.*}}: DW_OP_reg4 RSI) ; CHECK-NEXT: DW_AT_name [DW_FORM_strp]{{.*}} "a" -; CHECK: .debug_loc contents: -; rsi -; CHECK: Location description: 54 ; ; struct bar { ; int a; diff --git a/llvm/test/DebugInfo/X86/template.ll b/llvm/test/DebugInfo/X86/template.ll index dc2309df378..b99bc716b90 100644 --- a/llvm/test/DebugInfo/X86/template.ll +++ b/llvm/test/DebugInfo/X86/template.ll @@ -29,7 +29,7 @@ ; The address of the global 'glbl', followed by DW_OP_stack_value (9f), to use ; the value immediately, rather than indirecting through the address. -; CHECK-NEXT: DW_AT_location [DW_FORM_exprloc]{{ *}}(<0xa> 03 00 00 00 00 00 00 00 00 9f ) +; CHECK-NEXT: DW_AT_location [DW_FORM_exprloc]{{ *}}(DW_OP_addr 0x0, DW_OP_stack_value) ; CHECK-NOT: NULL ; CHECK: DW_TAG_GNU_template_template_param diff --git a/llvm/test/DebugInfo/X86/this-stack_value.ll b/llvm/test/DebugInfo/X86/this-stack_value.ll index bb8551f0386..92db39339a4 100644 --- a/llvm/test/DebugInfo/X86/this-stack_value.ll +++ b/llvm/test/DebugInfo/X86/this-stack_value.ll @@ -18,8 +18,8 @@ ; modified by the debugger. ; ; ASM: [DW_OP_stack_value] -; CHECK: DW_AT_location {{.*}} 70 00 9f -; rax+0, stack-value +; CHECK: DW_AT_location {{.*}} (DW_OP_breg0 RAX+0, DW_OP_stack_value) + source_filename = "ab.cpp" target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx10.12.0" diff --git a/llvm/test/DebugInfo/dwarfdump-debug-loc-simple.test b/llvm/test/DebugInfo/dwarfdump-debug-loc-simple.test index 77dfa2558c0..4c2f43d5b08 100644 --- a/llvm/test/DebugInfo/dwarfdump-debug-loc-simple.test +++ b/llvm/test/DebugInfo/dwarfdump-debug-loc-simple.test @@ -3,24 +3,20 @@ Note: the input file was generated from Inputs/dwarfdump-test-loc-list-32bit.elf CHECK: .debug_info CHECK: DW_AT_name{{.*}}"f" -CHECK: DW_AT_location{{.*}}([[F_LOC:0x[0-9a-f]*]]) +CHECK: DW_AT_location{{.*}}([[F_LOC:0x[0-9a-f]*]] +CHECK-NEXT: 0x0000000000000000 - 0x0000000000000023: DW_OP_reg1 ECX +CHECK-NEXT: 0x0000000000000023 - 0x000000000000005d: DW_OP_breg5 EBP-16) CHECK: DW_AT_name{{.*}}"g" -CHECK: DW_AT_location{{.*}}([[G_LOC:0x[0-9a-f]*]]) +CHECK: DW_AT_location{{.*}}([[G_LOC:0x[0-9a-f]*]] +CHECK-NEXT: 0x0000000000000000 - 0x0000000000000020: DW_OP_reg0 EAX +CHECK-NEXT: 0x0000000000000020 - 0x000000000000005d: DW_OP_breg5 EBP-12) + CHECK: .debug_loc contents: -CHECK-NEXT: [[F_LOC]]: Beginning address offset: 0x0000000000000000 -CHECK-NEXT: Ending address offset: 0x0000000000000023 +CHECK-NEXT: [[F_LOC]]: this is actually the wrong location due to PR14763, but that doesn't matter for the purposes of testing dwarfdump -CHECK-NEXT: Location description: 51 -CHECK-NEXT: {{^$}} -CHECK-NEXT: Beginning address offset: 0x0000000000000023 -CHECK-NEXT: Ending address offset: 0x000000000000005d -CHECK-NEXT: Location description: 75 70 -CHECK-NEXT: {{^$}} -CHECK-NEXT: [[G_LOC]]: Beginning address offset: 0x0000000000000000 -CHECK-NEXT: Ending address offset: 0x0000000000000020 -CHECK-NEXT: Location description: 50 -CHECK-NEXT: {{^$}} -CHECK-NEXT: Beginning address offset: 0x0000000000000020 -CHECK-NEXT: Ending address offset: 0x000000000000005d -CHECK-NEXT: Location description: 75 74 +CHECK-NEXT: 0x0000000000000000 - 0x0000000000000023: DW_OP_reg1 ECX +CHECK-NEXT: 0x0000000000000023 - 0x000000000000005d: DW_OP_breg5 EBP-16 +CHECK: [[G_LOC]]: +CHECK-NEXT: 0x0000000000000000 - 0x0000000000000020: DW_OP_reg0 EAX +CHECK-NEXT: 0x0000000000000020 - 0x000000000000005d: DW_OP_breg5 EBP-12 diff --git a/llvm/test/tools/dsymutil/ARM/scattered.c b/llvm/test/tools/dsymutil/ARM/scattered.c index c84a602063f..348cf33f682 100644 --- a/llvm/test/tools/dsymutil/ARM/scattered.c +++ b/llvm/test/tools/dsymutil/ARM/scattered.c @@ -6,7 +6,6 @@ int bar = 42; CHECK: DW_TAG_variable CHECK-NOT: DW_TAG -CHECK: DW_AT_name{{.*}}"bar" -CHECK-NOT: DW_TAG -CHECK: DW_AT_location{{.*}}<0x05> 03 10 00 01 00 - +CHECK: DW_AT_name{{.*}} +"bar" CHECK - NOT : DW_TAG + CHECK : DW_AT_location{{.*}}(DW_OP_addr 0x10010) diff --git a/llvm/test/tools/dsymutil/X86/basic-linking-x86.test b/llvm/test/tools/dsymutil/X86/basic-linking-x86.test index 37797a32350..77c8268f3d1 100644 --- a/llvm/test/tools/dsymutil/X86/basic-linking-x86.test +++ b/llvm/test/tools/dsymutil/X86/basic-linking-x86.test @@ -31,19 +31,19 @@ CHECK: DW_AT_external [DW_FORM_flag] (0x01) CHECK: DW_AT_accessibility [DW_FORM_data1] (DW_ACCESS_public) CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000100000ea0) CHECK: DW_AT_high_pc [DW_FORM_addr] (0x0000000100000ec4) -CHECK: DW_AT_frame_base [DW_FORM_block1] (<0x01> 56 ) +CHECK: DW_AT_frame_base [DW_FORM_block1] (DW_OP_reg6 RBP) CHECK: DW_TAG_formal_parameter [3] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000056] = "argc") CHECK: DW_AT_decl_file [DW_FORM_data1] ("/Inputs{{[/\\]}}basic1.c") CHECK: DW_AT_decl_line [DW_FORM_data1] (23) CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0063 => {0x00000063}) -CHECK: DW_AT_location [DW_FORM_block1] (<0x02> 91 78 ) +CHECK: DW_AT_location [DW_FORM_block1] (DW_OP_fbreg -8) CHECK: DW_TAG_formal_parameter [3] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000005b] = "argv") CHECK: DW_AT_decl_file [DW_FORM_data1] ("/Inputs{{[/\\]}}basic1.c") CHECK: DW_AT_decl_line [DW_FORM_data1] (23) CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x006a => {0x0000006a}) -CHECK: DW_AT_location [DW_FORM_block1] (<0x02> 91 70 ) +CHECK: DW_AT_location [DW_FORM_block1] (DW_OP_fbreg -16) CHECK: NULL CHECK: DW_TAG_base_type [4] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000060] = "int") @@ -75,31 +75,31 @@ CHECK: DW_TAG_variable [7] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000072] = "private_int") CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0026 => {0x000000a7}) CHECK: DW_AT_decl_file [DW_FORM_data1] ("/Inputs{{[/\\]}}basic2.c") -BASIC: DW_AT_location [DW_FORM_block1] (<0x09> 03 08 10 00 00 01 00 00 00 ) -ARCHIVE: DW_AT_location [DW_FORM_block1] (<0x09> 03 04 10 00 00 01 00 00 00 ) +BASIC: DW_AT_location [DW_FORM_block1] (DW_OP_addr 0x100001008) +ARCHIVE: DW_AT_location [DW_FORM_block1] (DW_OP_addr 0x100001004) CHECK: DW_TAG_variable [7] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000007e] = "baz") CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0026 => {0x000000a7}) CHECK: DW_AT_decl_file [DW_FORM_data1] ("/Inputs{{[/\\]}}basic2.c") -CHECK: DW_AT_location [DW_FORM_block1] (<0x09> 03 00 10 00 00 01 00 00 00 ) +CHECK: DW_AT_location [DW_FORM_block1] (DW_OP_addr 0x100001000) CHECK: DW_TAG_subprogram [2] * CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000082] = "foo") CHECK: DW_AT_decl_file [DW_FORM_data1] ("/Inputs{{[/\\]}}basic2.c") CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0026 => {0x000000a7}) CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000100000ed0) CHECK: DW_AT_high_pc [DW_FORM_addr] (0x0000000100000f19) -CHECK: DW_AT_frame_base [DW_FORM_block1] (<0x01> 56 ) +CHECK: DW_AT_frame_base [DW_FORM_block1] (DW_OP_reg6 RBP) CHECK: DW_TAG_formal_parameter [3] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000086] = "arg") CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0026 => {0x000000a7}) -CHECK: DW_AT_location [DW_FORM_block1] (<0x02> 91 7c ) +CHECK: DW_AT_location [DW_FORM_block1] (DW_OP_fbreg -4) CHECK: NULL CHECK: DW_TAG_subprogram [8] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000008a] = "inc") CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0026 => {0x000000a7}) CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000100000f20) CHECK: DW_AT_high_pc [DW_FORM_addr] (0x0000000100000f37) -CHECK: DW_AT_frame_base [DW_FORM_block1] (<0x01> 56 ) +CHECK: DW_AT_frame_base [DW_FORM_block1] (DW_OP_reg6 RBP) CHECK: NULL CHECK: Compile Unit: @@ -114,8 +114,8 @@ CHECK: DW_TAG_variable [9] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000097] = "val") CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x003c => {0x00000162}) CHECK: DW_AT_decl_file [DW_FORM_data1] ("/Inputs{{[/\\]}}basic3.c") -BASIC: DW_AT_location [DW_FORM_block1] (<0x09> 03 04 10 00 00 01 00 00 00 ) -ARCHIVE: DW_AT_location [DW_FORM_block1] (<0x09> 03 08 10 00 00 01 00 00 00 ) +BASIC: DW_AT_location [DW_FORM_block1] (DW_OP_addr 0x100001004) +ARCHIVE: DW_AT_location [DW_FORM_block1] (DW_OP_addr 0x100001008) CHECK: DW_TAG_volatile_type [10] CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0041 => {0x00000167}) CHECK: DW_TAG_base_type [4] @@ -125,18 +125,18 @@ CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000009b] = "bar") CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0041 => {0x00000167}) CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000100000f40) CHECK: DW_AT_high_pc [DW_FORM_addr] (0x0000000100000f84) -CHECK: DW_AT_frame_base [DW_FORM_block1] (<0x01> 56 ) +CHECK: DW_AT_frame_base [DW_FORM_block1] (DW_OP_reg6 RBP) CHECK: DW_TAG_formal_parameter [3] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000086] = "arg") CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0041 => {0x00000167}) -CHECK: DW_AT_location [DW_FORM_block1] (<0x02> 91 78 ) +CHECK: DW_AT_location [DW_FORM_block1] (DW_OP_fbreg -8) CHECK: NULL CHECK: DW_TAG_subprogram [8] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000008a] = "inc") CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0041 => {0x00000167}) CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000100000f90) CHECK: DW_AT_high_pc [DW_FORM_addr] (0x0000000100000fa9) -CHECK: DW_AT_frame_base [DW_FORM_block1] (<0x01> 56 ) +CHECK: DW_AT_frame_base [DW_FORM_block1] (DW_OP_reg6 RBP) CHECK: NULL diff --git a/llvm/test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test b/llvm/test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test index 56b78588b75..67de0f62b4b 100644 --- a/llvm/test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test +++ b/llvm/test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test @@ -16,19 +16,19 @@ CHECK: DW_AT_high_pc [DW_FORM_data4] (0x0000000b) CHECK: DW_TAG_subprogram [2] * CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000100000f40) CHECK: DW_AT_high_pc [DW_FORM_data4] (0x0000000b) -CHECK: DW_AT_frame_base [DW_FORM_exprloc] (<0x1> 56 ) +CHECK: DW_AT_frame_base [DW_FORM_exprloc] (DW_OP_reg6 RBP) CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000027] = "main") CHECK: DW_AT_decl_file [DW_FORM_data1] ("/Inputs{{[/\\]}}basic1.c") CHECK: DW_AT_prototyped [DW_FORM_flag_present] (true) CHECK: DW_AT_type [DW_FORM_ref_addr] (0x00000000000000a1) CHECK: DW_AT_external [DW_FORM_flag_present] (true) CHECK: DW_TAG_formal_parameter [3] -CHECK: DW_AT_location [DW_FORM_exprloc] (<0x3> 55 93 04 ) +CHECK: DW_AT_location [DW_FORM_exprloc] (DW_OP_reg5 RDI, DW_OP_piece 0x4) CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000002c] = "argc") CHECK: DW_AT_decl_file [DW_FORM_data1] ("/Inputs{{[/\\]}}basic1.c") CHECK: DW_AT_type [DW_FORM_ref_addr] (0x00000000000000a1) CHECK: DW_TAG_formal_parameter [4] -CHECK: DW_AT_location [DW_FORM_exprloc] (<0x1> 54 ) +CHECK: DW_AT_location [DW_FORM_exprloc] (DW_OP_reg4 RSI) CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000031] = "argv") CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0060 => {0x00000060}) CHECK: NULL @@ -55,11 +55,11 @@ CHECK: DW_TAG_base_type [7] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000044] = "int") CHECK: DW_TAG_variable [8] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000048] = "baz") -CHECK: DW_AT_location [DW_FORM_exprloc] (<0x9> 03 00 10 00 00 01 00 00 00 ) +CHECK: DW_AT_location [DW_FORM_exprloc] (DW_OP_addr 0x100001000) CHECK: DW_TAG_variable [8] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000004c] = "private_int") CHECK: DW_AT_decl_file [DW_FORM_data1] ("/Inputs{{[/\\]}}basic2.c") -CHECK: DW_AT_location [DW_FORM_exprloc] (<0x9> 03 08 10 00 00 01 00 00 00 ) +CHECK: DW_AT_location [DW_FORM_exprloc] (DW_OP_addr 0x100001008) CHECK: DW_TAG_subprogram [9] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000058] = "inc") CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x002a => {0x000000a1}) @@ -67,13 +67,14 @@ CHECK: DW_AT_inline [DW_FORM_data1] (DW_INL_inlined) CHECK: DW_TAG_subprogram [10] * CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000100000f50) CHECK: DW_AT_high_pc [DW_FORM_data4] (0x00000037) -CHECK: DW_AT_frame_base [DW_FORM_exprloc] (<0x1> 56 ) +CHECK: DW_AT_frame_base [DW_FORM_exprloc] (DW_OP_reg6 RBP) CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000005c] = "foo") CHECK: DW_AT_decl_file [DW_FORM_data1] ("/Inputs{{[/\\]}}basic2.c") CHECK: DW_AT_prototyped [DW_FORM_flag_present] (true) CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x002a => {0x000000a1}) CHECK: DW_TAG_formal_parameter [11] -CHECK: DW_AT_location [DW_FORM_sec_offset] (0x00000000) +CHECK: DW_AT_location [DW_FORM_sec_offset] (0x00000000 +CHECK: 0x0000000000000000 - 0x000000000000000c: DW_OP_reg5 RDI, DW_OP_piece 0x4) CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000060] = "arg") CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x002a => {0x000000a1}) CHECK: DW_TAG_inlined_subroutine [12] @@ -94,7 +95,7 @@ CHECK: DW_AT_high_pc [DW_FORM_data4] (0x00000024) CHECK: DW_TAG_variable [13] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000006d] = "val") CHECK: DW_AT_decl_file [DW_FORM_data1] ("/Inputs{{[/\\]}}basic3.c") -CHECK: DW_AT_location [DW_FORM_exprloc] (<0x9> 03 04 10 00 00 01 00 00 00 ) +CHECK: DW_AT_location [DW_FORM_exprloc] (DW_OP_addr 0x100001004) CHECK: DW_TAG_volatile_type [14] CHECK: DW_TAG_subprogram [15] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000058] = "inc") @@ -102,10 +103,12 @@ CHECK: DW_AT_inline [DW_FORM_data1] (DW_INL_inlined) CHECK: DW_TAG_subprogram [2] * CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000100000f90) CHECK: DW_AT_high_pc [DW_FORM_data4] (0x00000024) -CHECK: DW_AT_frame_base [DW_FORM_exprloc] (<0x1> 56 ) +CHECK: DW_AT_frame_base [DW_FORM_exprloc] (DW_OP_reg6 RBP) CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000071] = "bar") CHECK: DW_TAG_formal_parameter [16] -CHECK: DW_AT_location [DW_FORM_sec_offset] (0x00000025) +CHECK: DW_AT_location [DW_FORM_sec_offset] (0x00000025 +CHECK: 0x0000000000000000 - 0x000000000000000f: DW_OP_reg5 RDI, DW_OP_piece 0x4 +CHECK: 0x0000000000000019 - 0x000000000000001d: DW_OP_reg5 RDI, DW_OP_piece 0x4) CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000060] = "arg") CHECK: DW_TAG_inlined_subroutine [17] CHECK: DW_AT_abstract_origin [DW_FORM_ref4] (cu + 0x0044 => {0x0000015f} "inc") @@ -118,17 +121,13 @@ CHECK: NULL CHECK: .debug_loc contents: -CHECK-NEXT: 0x00000000: Beginning address offset: 0x0000000000000000 -CHECK-NEXT: Ending address offset: 0x000000000000000c -CHECK-NEXT: Location description: 55 93 04 -CHECK-NEXT: {{^$}} -CHECK-NEXT: 0x00000025: Beginning address offset: 0x0000000000000000 -CHECK-NEXT: Ending address offset: 0x000000000000000f -CHECK-NEXT: Location description: 55 93 04 -CHECK-NEXT: {{^$}} -CHECK-NEXT: Beginning address offset: 0x0000000000000019 -CHECK-NEXT: Ending address offset: 0x000000000000001d -CHECK-NEXT: Location description: 55 93 04 +CHECK-NEXT: 0x00000000: +CHECK-NEXT: 0x0000000000000000 - 0x000000000000000c: DW_OP_reg5 RDI, DW_OP_piece 0x4 +CHECK-NOT: : +CHECK: 0x00000025: +CHECK-NEXT: 0x0000000000000000 - 0x000000000000000f: DW_OP_reg5 RDI, DW_OP_piece 0x4 +CHECK-NEXT: 0x0000000000000019 - 0x000000000000001d: DW_OP_reg5 RDI, DW_OP_piece 0x4 + CHECK: .debug_aranges contents: CHECK-NEXT: Address Range Header: length = 0x0000002c, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x08, seg_size = 0x00 diff --git a/llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test b/llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test index 68103aa44ca..da5e09e067b 100644 --- a/llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test +++ b/llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test @@ -24,15 +24,15 @@ CHECK: DW_AT_external [DW_FORM_flag] (0x01) CHECK: DW_AT_accessibility [DW_FORM_data1] (DW_ACCESS_public) CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000100000f40) CHECK: DW_AT_high_pc [DW_FORM_addr] (0x0000000100000f4b) -CHECK: DW_AT_frame_base [DW_FORM_block1] (<0x01> 56 ) +CHECK: DW_AT_frame_base [DW_FORM_block1] (DW_OP_reg6 RBP) CHECK: DW_TAG_formal_parameter [3] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000056] = "argc") CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0063 => {0x00000063}) -CHECK: DW_AT_location [DW_FORM_block1] (<0x03> 55 93 04 ) +CHECK: DW_AT_location [DW_FORM_block1] (DW_OP_reg5 RDI, DW_OP_piece 0x4) CHECK: DW_TAG_formal_parameter [3] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000005b] = "argv") CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x006a => {0x0000006a}) -CHECK: DW_AT_location [DW_FORM_block1] (<0x01> 54 ) +CHECK: DW_AT_location [DW_FORM_block1] (DW_OP_reg4 RSI) CHECK: NULL CHECK: DW_TAG_base_type [4] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000060] = "int") @@ -62,21 +62,22 @@ CHECK: DW_TAG_variable [7] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000072] = "private_int") CHECK: DW_AT_type [DW_FORM_ref_addr] (0x0000000000000063) CHECK: DW_AT_decl_file [DW_FORM_data1] ("/Inputs{{[/\\]}}basic2.c") -CHECK: DW_AT_location [DW_FORM_block1] (<0x09> 03 08 10 00 00 01 00 00 00 ) +CHECK: DW_AT_location [DW_FORM_block1] (DW_OP_addr 0x100001008) CHECK: DW_TAG_variable [7] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000007e] = "baz") CHECK: DW_AT_type [DW_FORM_ref_addr] (0x0000000000000063) -CHECK: DW_AT_location [DW_FORM_block1] (<0x09> 03 00 10 00 00 01 00 00 00 ) +CHECK: DW_AT_location [DW_FORM_block1] (DW_OP_addr 0x100001000) CHECK: DW_TAG_subprogram [8] * CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000082] = "foo") CHECK: DW_AT_type [DW_FORM_ref_addr] (0x0000000000000063) CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000100000f50) CHECK: DW_AT_high_pc [DW_FORM_addr] (0x0000000100000f89) -CHECK: DW_AT_frame_base [DW_FORM_block1] (<0x01> 56 ) +CHECK: DW_AT_frame_base [DW_FORM_block1] (DW_OP_reg6 RBP) CHECK: DW_TAG_formal_parameter [9] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000086] = "arg") CHECK: DW_AT_type [DW_FORM_ref_addr] (0x0000000000000063) -CHECK: DW_AT_location [DW_FORM_data4] (0x00000000) +CHECK: DW_AT_location [DW_FORM_data4] (0x00000000 +CHECK: 0x0000000000000000 - 0x000000000000000e: DW_OP_reg5 RDI, DW_OP_piece 0x4) CHECK: DW_TAG_inlined_subroutine [10] CHECK: DW_AT_abstract_origin [DW_FORM_ref4] (cu + 0x00a7 => {0x00000128} "inc") CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000100000f63) @@ -101,7 +102,7 @@ CHECK: DW_TAG_variable [12] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000097] = "val") CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x003c => {0x00000176}) CHECK: DW_AT_decl_file [DW_FORM_data1] ("/Inputs{{[/\\]}}basic3.c") -CHECK: DW_AT_location [DW_FORM_block1] (<0x09> 03 04 10 00 00 01 00 00 00 ) +CHECK: DW_AT_location [DW_FORM_block1] (DW_OP_addr 0x100001004) CHECK: DW_TAG_volatile_type [13] CHECK: DW_AT_type [DW_FORM_ref_addr] (0x0000000000000063) CHECK: DW_TAG_subprogram [8] * @@ -109,11 +110,13 @@ CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000009b] = "bar") CHECK: DW_AT_type [DW_FORM_ref_addr] (0x0000000000000063) CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000100000f90) CHECK: DW_AT_high_pc [DW_FORM_addr] (0x0000000100000fb4) -CHECK: DW_AT_frame_base [DW_FORM_block1] (<0x01> 56 ) +CHECK: DW_AT_frame_base [DW_FORM_block1] (DW_OP_reg6 RBP) CHECK: DW_TAG_formal_parameter [9] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000086] = "arg") CHECK: DW_AT_type [DW_FORM_ref_addr] (0x0000000000000063) -CHECK: DW_AT_location [DW_FORM_data4] (0x00000025) +CHECK: DW_AT_location [DW_FORM_data4] (0x00000025 +CHECK: 0x0000000000000000 - 0x000000000000000f: DW_OP_reg5 RDI, DW_OP_piece 0x4 +CHECK: 0x0000000000000019 - 0x000000000000001d: DW_OP_reg5 RDI, DW_OP_piece 0x4) CHECK: DW_TAG_lexical_block [14] * CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000100000f94) CHECK: DW_AT_high_pc [DW_FORM_addr] (0x0000000100000fa7) @@ -129,18 +132,13 @@ CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000008a] = "inc") CHECK: DW_AT_type [DW_FORM_ref_addr] (0x0000000000000063) CHECK: NULL -CHECK:.debug_loc contents: -CHECK-NEXT: 0x00000000: Beginning address offset: 0x0000000000000000 -CHECK-NEXT: Ending address offset: 0x000000000000000e -CHECK-NEXT: Location description: 55 93 04 -CHECK-NEXT: {{^$}} -CHECK-NEXT: 0x00000025: Beginning address offset: 0x0000000000000000 -CHECK-NEXT: Ending address offset: 0x000000000000000f -CHECK-NEXT: Location description: 55 93 04 -CHECK-NEXT: {{^$}} -CHECK-NEXT: Beginning address offset: 0x0000000000000019 -CHECK-NEXT: Ending address offset: 0x000000000000001d -CHECK-NEXT: Location description: 55 93 04 +CHECK: .debug_loc contents: +CHECK-NEXT: 0x00000000: +CHECK-NEXT: 0x0000000000000000 - 0x000000000000000e: DW_OP_reg5 RDI, DW_OP_piece 0x4 +CHECK-NOT: : +CHECK: 0x00000025: +CHECK-NEXT: 0x0000000000000000 - 0x000000000000000f: DW_OP_reg5 RDI, DW_OP_piece 0x4 +CHECK-NEXT: 0x0000000000000019 - 0x000000000000001d: DW_OP_reg5 RDI, DW_OP_piece 0x4 CHECK: .debug_aranges contents: CHECK-NEXT: Address Range Header: length = 0x0000002c, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x08, seg_size = 0x00 diff --git a/llvm/test/tools/dsymutil/X86/common-sym.test b/llvm/test/tools/dsymutil/X86/common-sym.test index a5e4e73bf8b..780c5deec62 100644 --- a/llvm/test/tools/dsymutil/X86/common-sym.test +++ b/llvm/test/tools/dsymutil/X86/common-sym.test @@ -11,7 +11,7 @@ $ clang common.macho.x86_64.o -o common.macho.x86_64 CHECK: DW_TAG_variable CHECK: DW_AT_name {{.*}} "common" CHECK-NOT: {{NULL|DW_TAG}} -CHECK: DW_AT_location {{.*}} (<0x09> 03 00 10 00 00 01 00 00 00 ) +CHECK: DW_AT_location {{.*}} (DW_OP_addr 0x100001000) CHECK: DW_TAG_subprogram CHECK-NEXT: DW_AT_low_pc{{.*}}(0x0000000100000f80) |

