[llvm] 9feb461 - Generalize DWARF tests that expect DW_FORM_strp

Jake Egan via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 26 20:43:00 PDT 2021


Author: Jake Egan
Date: 2021-10-26T23:42:50-04:00
New Revision: 9feb461375603bbf60c8f99dbba38a9059356a33

URL: https://github.com/llvm/llvm-project/commit/9feb461375603bbf60c8f99dbba38a9059356a33
DIFF: https://github.com/llvm/llvm-project/commit/9feb461375603bbf60c8f99dbba38a9059356a33.diff

LOG: Generalize DWARF tests that expect DW_FORM_strp

The modified tests were failing on AIX because DWARF on AIX uses inline strings by default, but the tests check for `DW_FORM_strp`.

This patch removes `DW_FORM_strp` so both forms will pass the check.

Reviewed By: shchenz, dblaikie

Differential Revision: https://reviews.llvm.org/D112286

Added: 
    

Modified: 
    llvm/test/DebugInfo/Generic/containing-type-extension.ll
    llvm/test/DebugInfo/Generic/debug-label-inline.ll
    llvm/test/DebugInfo/Generic/debug-label.ll
    llvm/test/DebugInfo/Generic/tu-composite.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/DebugInfo/Generic/containing-type-extension.ll b/llvm/test/DebugInfo/Generic/containing-type-extension.ll
index 5031fe516e20..5742fdff2803 100644
--- a/llvm/test/DebugInfo/Generic/containing-type-extension.ll
+++ b/llvm/test/DebugInfo/Generic/containing-type-extension.ll
@@ -5,7 +5,7 @@
 ; CHECK: [[SP:.*]]: DW_TAG_structure_type
 ; CHECK-NOT: TAG
 ; CHECK: DW_AT_containing_type [DW_FORM_ref4]
-; CHECK: DW_AT_name [DW_FORM_strp] {{.*}}= "vtable")
+; CHECK: DW_AT_name {{.*}}= "vtable")
 
 ; The code doesn't actually matter.
 define i32 @main() #0 !dbg !4 {

diff  --git a/llvm/test/DebugInfo/Generic/debug-label-inline.ll b/llvm/test/DebugInfo/Generic/debug-label-inline.ll
index 42b617628456..fec1dd570584 100644
--- a/llvm/test/DebugInfo/Generic/debug-label-inline.ll
+++ b/llvm/test/DebugInfo/Generic/debug-label-inline.ll
@@ -5,7 +5,7 @@
 ;
 ; CHECK: .debug_info contents:
 ; CHECK: [[LABEL_ORIGIN:0x[0-9a-zA-Z]+]]:{{ *}}DW_TAG_label
-; CHECK-NEXT: DW_AT_name [DW_FORM_strp] {{.*}}"top"
+; CHECK-NEXT: DW_AT_name {{.*}}"top"
 ; CHECK-NEXT: DW_AT_decl_file [DW_FORM_data1] {{.*}}debug-label-inline.c
 ; CHECK-NEXT: DW_AT_decl_line [DW_FORM_data1] {{.*}}8
 ; CHECK: DW_TAG_label

diff  --git a/llvm/test/DebugInfo/Generic/debug-label.ll b/llvm/test/DebugInfo/Generic/debug-label.ll
index 9139c98028db..e45d49d58896 100644
--- a/llvm/test/DebugInfo/Generic/debug-label.ll
+++ b/llvm/test/DebugInfo/Generic/debug-label.ll
@@ -2,16 +2,16 @@
 ;
 ; CHECK: .debug_info contents:
 ; CHECK: DW_TAG_label
-; CHECK-NEXT: DW_AT_name [DW_FORM_strp] {{.*}}"top"
+; CHECK-NEXT: DW_AT_name {{.*}}"top"
 ; CHECK-NEXT: DW_AT_decl_file [DW_FORM_data1] {{.*}}debug-label.c
 ; CHECK-NEXT: DW_AT_decl_line [DW_FORM_data1] {{.*}}4
 ; CHECK-NEXT: DW_AT_low_pc [DW_FORM_addr] {{.*}}{{0x[0-9a-f]+}}
 ; CHECK: DW_TAG_label
-; CHECK-NEXT: DW_AT_name [DW_FORM_strp] {{.*}}"done"
+; CHECK-NEXT: DW_AT_name {{.*}}"done"
 ; CHECK-NEXT: DW_AT_decl_file [DW_FORM_data1] {{.*}}debug-label.c
 ; CHECK-NEXT: DW_AT_decl_line [DW_FORM_data1] {{.*}}7
 ; CHECK-NEXT: DW_AT_low_pc [DW_FORM_addr] {{.*}}{{0x[0-9a-f]+}}
-; CHECK-NOT: DW_AT_name [DW_FORM_strp] {{.*}}"top"
+; CHECK-NOT: DW_AT_name {{.*}}"top"
 ;
 ; RUN: llc -O0 -o - %s | FileCheck %s -check-prefix=ASM
 ;

diff  --git a/llvm/test/DebugInfo/Generic/tu-composite.ll b/llvm/test/DebugInfo/Generic/tu-composite.ll
index f6694d149677..1f287d9be569 100644
--- a/llvm/test/DebugInfo/Generic/tu-composite.ll
+++ b/llvm/test/DebugInfo/Generic/tu-composite.ll
@@ -3,11 +3,11 @@
 ; CHECK: [[TYPE:.*]]: DW_TAG_structure_type
 ; Make sure we correctly handle containing type of a struct being a type identifier.
 ; CHECK-NEXT: DW_AT_containing_type [DW_FORM_ref4]       (cu + {{.*}} => {[[TYPE]]})
-; CHECK-NEXT: DW_AT_name [DW_FORM_strp] {{.*}}= "C")
+; CHECK-NEXT: DW_AT_name {{.*}}= "C")
 
 ; Make sure we correctly handle context of a subprogram being a type identifier.
 ; CHECK: [[SP:.*]]: DW_TAG_subprogram
-; CHECK: DW_AT_name [DW_FORM_strp] {{.*}}= "foo")
+; CHECK: DW_AT_name {{.*}}= "foo")
 ; Make sure we correctly handle containing type of a subprogram being a type identifier.
 ; CHECK: DW_AT_containing_type [DW_FORM_ref4]       (cu + {{.*}} => {[[TYPE]]})
 ; CHECK: DW_TAG_formal_parameter
@@ -15,33 +15,33 @@
 ; CHECK: NULL
 
 ; CHECK: [[TYPE2:.*]]: DW_TAG_structure_type
-; CHECK: DW_AT_name [DW_FORM_strp] {{.*}}= "bar")
+; CHECK: DW_AT_name {{.*}}= "bar")
 ; CHECK: DW_TAG_structure_type
-; CHECK: DW_AT_name [DW_FORM_strp] {{.*}}= "D")
+; CHECK: DW_AT_name {{.*}}= "D")
 ; CHECK: DW_TAG_member
-; CHECK: DW_AT_name [DW_FORM_strp] {{.*}}= "a") 
+; CHECK: DW_AT_name {{.*}}= "a") 
 ; Make sure we correctly handle context of a struct being a type identifier.
 ; CHECK: DW_TAG_structure_type
-; CHECK-NEXT: DW_AT_name [DW_FORM_strp] {{.*}}= "Nested")
+; CHECK-NEXT: DW_AT_name {{.*}}= "Nested")
 ; CHECK: DW_TAG_structure_type
-; CHECK-NEXT: DW_AT_name [DW_FORM_strp] {{.*}}= "Nested2")
+; CHECK-NEXT: DW_AT_name {{.*}}= "Nested2")
 ; CHECK-NEXT: DW_AT_declaration [DW_FORM_flag]      (0x01)
 ; CHECK: DW_TAG_structure_type
-; CHECK-NEXT: DW_AT_name [DW_FORM_strp] {{.*}}= "virt<bar>")
+; CHECK-NEXT: DW_AT_name {{.*}}= "virt<bar>")
 ; Make sure we correctly handle type of a template_type being a type identifier.
 ; CHECK: DW_TAG_template_type_parameter
 ; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE2]]}
-; CHECK-NEXT: DW_AT_name [DW_FORM_strp] {{.*}}= "T")
+; CHECK-NEXT: DW_AT_name {{.*}}= "T")
 ; Make sure we correctly handle derived-from of a typedef being a type identifier.
 ; CHECK: DW_TAG_typedef
 ; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE2]]}
-; CHECK: DW_AT_name [DW_FORM_strp] {{.*}}= "baz2")
+; CHECK: DW_AT_name {{.*}}= "baz2")
 ; Make sure we correctly handle derived-from of a pointer type being a type identifier.
 ; CHECK: DW_TAG_pointer_type
 ; CHECK: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE]]}
 ; CHECK: DW_TAG_typedef
 ; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE2]]}
-; CHECK: DW_AT_name [DW_FORM_strp] {{.*}}= "baz")
+; CHECK: DW_AT_name {{.*}}= "baz")
 ; Make sure we correctly handle derived-from of an array type being a type identifier.
 ; CHECK: DW_TAG_array_type
 ; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE2]]}


        


More information about the llvm-commits mailing list