[llvm] r210940 - DebugInfo: Refactor some tests to allow DW_AT_name to not be the first attribute in a local variable.

David Blaikie dblaikie at gmail.com
Fri Jun 13 14:52:33 PDT 2014


Author: dblaikie
Date: Fri Jun 13 16:52:33 2014
New Revision: 210940

URL: http://llvm.org/viewvc/llvm-project?rev=210940&view=rev
Log:
DebugInfo: Refactor some tests to allow DW_AT_name to not be the first attribute in a local variable.

In an effort to fix concrete variables referencing abstract origins
where the concrete variable preceeds the first inlined usage, the
addition of attributes such as name, file, etc will be delayed until the
end of the module (to wait to see if any inlined instances have
occurred, thus necessitating an abstract definition that the concrete
definition should also reference).

These test cases don't actually need to care about this ordering of
attributes, so update them to be more resilient to such changes coming
in the near future.

Modified:
    llvm/trunk/test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll
    llvm/trunk/test/DebugInfo/X86/DW_AT_object_pointer.ll
    llvm/trunk/test/DebugInfo/X86/arguments.ll
    llvm/trunk/test/DebugInfo/X86/block-capture.ll
    llvm/trunk/test/DebugInfo/X86/byvalstruct.ll
    llvm/trunk/test/DebugInfo/X86/dbg-value-inlined-parameter.ll
    llvm/trunk/test/DebugInfo/X86/formal_parameter.ll
    llvm/trunk/test/DebugInfo/X86/subregisters.ll
    llvm/trunk/test/DebugInfo/inlined-arguments.ll

Modified: llvm/trunk/test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll?rev=210940&r1=210939&r2=210940&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll Fri Jun 13 16:52:33 2014
@@ -37,13 +37,19 @@ declare void @llvm.dbg.declare(metadata,
 !20 = metadata !{metadata !"test.c", metadata !"/work/llvm/vanilla/test/DebugInfo"}
 
 ; CHECK: DW_TAG_variable
-; CHECK-NEXT: DW_AT_name [DW_FORM_strp]       ( .debug_str[0x{{[0-9a-f]*}}] = "GLB")
+; CHECK-NOT: DW_TAG
+; CHECK: DW_AT_name [DW_FORM_strp]       ( .debug_str[0x{{[0-9a-f]*}}] = "GLB")
+; CHECK-NOT: DW_TAG
 ; CHECK: DW_AT_decl_file [DW_FORM_data1] (0x01)
+; CHECK-NOT: DW_TAG
 ; CHECK: DW_AT_decl_line [DW_FORM_data1] (0x01)
 
 ; CHECK: DW_TAG_variable
-; CHECK-NEXT: DW_AT_name [DW_FORM_strp]   ( .debug_str[0x{{[0-9a-f]*}}] = "LOC")
+; CHECK-NOT: DW_TAG
+; CHECK: DW_AT_name [DW_FORM_strp]   ( .debug_str[0x{{[0-9a-f]*}}] = "LOC")
+; CHECK-NOT: DW_TAG
 ; CHECK: DW_AT_decl_file [DW_FORM_data1]     (0x01)
+; CHECK-NOT: DW_TAG
 ; CHECK: DW_AT_decl_line [DW_FORM_data1]     (0x04)
 
 !21 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}

Modified: llvm/trunk/test/DebugInfo/X86/DW_AT_object_pointer.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/DW_AT_object_pointer.ll?rev=210940&r1=210939&r2=210940&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/DW_AT_object_pointer.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/DW_AT_object_pointer.ll Fri Jun 13 16:52:33 2014
@@ -7,7 +7,8 @@
 ; CHECK: DW_TAG_class_type
 ; CHECK: DW_AT_object_pointer [DW_FORM_ref4]     (cu + 0x{{[0-9a-f]*}} => {[[PARAM:0x[0-9a-f]*]]})
 ; CHECK: [[PARAM]]:     DW_TAG_formal_parameter
-; CHECK-NEXT: DW_AT_name [DW_FORM_strp]     ( .debug_str[0x{{[0-9a-f]*}}] = "this")
+; CHECK-NOT: DW_TAG
+; CHECK: DW_AT_name [DW_FORM_strp]     ( .debug_str[0x{{[0-9a-f]*}}] = "this")
 
 %class.A = type { i32 }
 

Modified: llvm/trunk/test/DebugInfo/X86/arguments.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/arguments.ll?rev=210940&r1=210939&r2=210940&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/arguments.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/arguments.ll Fri Jun 13 16:52:33 2014
@@ -19,10 +19,12 @@
 ; CHECK: DW_AT_MIPS_linkage_name{{.*}}"_Z4func3fooS_"
 ; CHECK-NOT: NULL
 ; CHECK: DW_TAG_formal_parameter
-; CHECK-NEXT: DW_AT_name{{.*}}"f"
+; CHECK-NOT: DW_TAG
+; CHECK: DW_AT_name{{.*}}"f"
 ; CHECK-NOT: NULL
 ; CHECK: DW_TAG_formal_parameter
-; CHECK-NEXT: DW_AT_name{{.*}}"g"
+; CHECK-NOT: DW_TAG
+; CHECK: DW_AT_name{{.*}}"g"
 
 %struct.foo = type { i32 }
 

Modified: llvm/trunk/test/DebugInfo/X86/block-capture.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/block-capture.ll?rev=210940&r1=210939&r2=210940&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/block-capture.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/block-capture.ll Fri Jun 13 16:52:33 2014
@@ -6,13 +6,13 @@
 ; Checks that we emit debug info for the block variable declare.
 ; CHECK: DW_TAG_subprogram
 ; CHECK: DW_TAG_variable
-; CHECK: DW_AT_name {{.*}} "block"
 ; CHECK: DW_AT_location [DW_FORM_sec_offset]
+; CHECK: DW_AT_name {{.*}} "block"
 
 ; DWARF3: DW_TAG_subprogram
 ; DWARF3: DW_TAG_variable
-; DWARF3: DW_AT_name {{.*}} "block"
 ; DWARF3: DW_AT_location [DW_FORM_data4]
+; DWARF3: DW_AT_name {{.*}} "block"
 
 %struct.__block_descriptor = type { i64, i64 }
 %struct.__block_literal_generic = type { i8*, i32, i32, i8*, %struct.__block_descriptor* }

Modified: llvm/trunk/test/DebugInfo/X86/byvalstruct.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/byvalstruct.ll?rev=210940&r1=210939&r2=210940&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/byvalstruct.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/byvalstruct.ll Fri Jun 13 16:52:33 2014
@@ -6,7 +6,8 @@
 ; CHECK: DW_TAG_formal_parameter
 ; CHECK: DW_TAG_formal_parameter
 ; CHECK: DW_TAG_formal_parameter
-; CHECK-NEXT: DW_AT_name {{.*}} "info"
+; CHECK-NOT: DW_TAG
+; CHECK: DW_AT_name {{.*}} "info"
 ;
 ; generated from
 ;

Modified: llvm/trunk/test/DebugInfo/X86/dbg-value-inlined-parameter.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/dbg-value-inlined-parameter.ll?rev=210940&r1=210939&r2=210940&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/dbg-value-inlined-parameter.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/dbg-value-inlined-parameter.ll Fri Jun 13 16:52:33 2014
@@ -10,16 +10,21 @@
 ; FIXME: An out of line definition preceding an inline usage doesn't properly
 ; reference abstract variables.
 ; CHECK:   DW_TAG_formal_parameter
-; CHECK-NEXT:     DW_AT_name {{.*}} "sp"
+; CHECK-NOT: DW_TAG
+; CHECK:     DW_AT_name {{.*}} "sp"
 ; CHECK:   DW_TAG_formal_parameter
-; CHECK-NEXT:     DW_AT_name {{.*}} "nums"
+; CHECK-NOT: DW_TAG
+; CHECK:     DW_AT_name {{.*}} "nums"
 
 ; CHECK: [[ABS]]: DW_TAG_subprogram
+; CHECK-NOT: DW_TAG
 ; CHECK:   DW_AT_name {{.*}} "foo"
 ; CHECK: [[ABS_SP:.*]]:   DW_TAG_formal_parameter
-; CHECK-NEXT:     DW_AT_name {{.*}} "sp"
+; CHECK-NOT: DW_TAG
+; CHECK:     DW_AT_name {{.*}} "sp"
 ; CHECK: [[ABS_NUMS:.*]]:  DW_TAG_formal_parameter
-; CHECK-NEXT:     DW_AT_name {{.*}} "nums"
+; CHECK-NOT: DW_TAG
+; CHECK:     DW_AT_name {{.*}} "nums"
 
 ;CHECK: DW_TAG_inlined_subroutine
 ;CHECK-NEXT: DW_AT_abstract_origin {{.*}}{[[ABS]]}
@@ -30,9 +35,10 @@
 
 ;CHECK: DW_TAG_formal_parameter
 ;FIXME: Linux shouldn't drop this parameter either...
-;DARWIN-NEXT:   DW_AT_abstract_origin {{.*}}{[[ABS_SP]]}
+;CHECK-NOT: DW_TAG
+;DARWIN:   DW_AT_abstract_origin {{.*}}{[[ABS_SP]]}
 ;DARWIN: DW_TAG_formal_parameter
-;CHECK-NEXT: DW_AT_abstract_origin {{.*}}{[[ABS_NUMS]]}
+;CHECK: DW_AT_abstract_origin {{.*}}{[[ABS_NUMS]]}
 ;CHECK-NOT: DW_TAG_formal_parameter
 
 %struct.S1 = type { float*, i32 }

Modified: llvm/trunk/test/DebugInfo/X86/formal_parameter.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/formal_parameter.ll?rev=210940&r1=210939&r2=210940&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/formal_parameter.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/formal_parameter.ll Fri Jun 13 16:52:33 2014
@@ -19,7 +19,8 @@ target triple = "x86_64-apple-macosx10.9
 ; rdar://problem/14874886
 ;
 ; CHECK: DW_TAG_formal_parameter
-; CHECK-NEXT: DW_AT_name {{.*}}map
+; CHECK-NOT: DW_TAG
+; CHECK: DW_AT_name {{.*}}map
 ; CHECK-NOT: DW_AT_name {{.*}}map
 
 ; Function Attrs: nounwind ssp uwtable

Modified: llvm/trunk/test/DebugInfo/X86/subregisters.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/subregisters.ll?rev=210940&r1=210939&r2=210940&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/subregisters.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/subregisters.ll Fri Jun 13 16:52:33 2014
@@ -6,8 +6,8 @@
 ;
 ; rdar://problem/16015314
 ;
+; CHECK:  DW_AT_location [DW_FORM_block1]       (<0x03> 54 93 04 )
 ; CHECK:  DW_AT_name [DW_FORM_strp]{{.*}} "a"
-; CHECK:    DW_AT_location [DW_FORM_block1]       (<0x03> 54 93 04 )
 ;
 ; struct bar {
 ;   int a;

Modified: llvm/trunk/test/DebugInfo/inlined-arguments.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/inlined-arguments.ll?rev=210940&r1=210939&r2=210940&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/inlined-arguments.ll (original)
+++ llvm/trunk/test/DebugInfo/inlined-arguments.ll Fri Jun 13 16:52:33 2014
@@ -16,9 +16,11 @@
 
 ; CHECK: DW_AT_name{{.*}}"f1"
 ; CHECK: DW_TAG_formal_parameter
-; CHECK-NEXT: DW_AT_name{{.*}}"x"
+; CHECK-NOT: DW_TAG
+; CHECK: DW_AT_name{{.*}}"x"
 ; CHECK: DW_TAG_formal_parameter
-; CHECK-NEXT: DW_AT_name{{.*}}"y"
+; CHECK-NOT: DW_TAG
+; CHECK: DW_AT_name{{.*}}"y"
 
 ; Function Attrs: uwtable
 define void @_Z2f2v() #0 {





More information about the llvm-commits mailing list