Skip to content

Commit 1c2d333

Browse files
committed
[DWARF] Standardize checks and remove verbose where possible in DWARF tests
This patch removes the verbose option from tests that do not need it and simplifies the checks. For tests that do have the verbose option, the checks were standardized to be more readable and consistent. Reviewed By: shchenz, dblaikie Differential Revision: https://reviews.llvm.org/D112636
1 parent fa1dd5f commit 1c2d333

33 files changed

+196
-196
lines changed

llvm/test/DebugInfo/Generic/2010-04-06-NestedFnDbgInfo.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
; RUN: %llc_dwarf -O0 -filetype=obj -o - < %s | llvm-dwarfdump -v -debug-info - | FileCheck %s
1+
; RUN: %llc_dwarf -O0 -filetype=obj -o - < %s | llvm-dwarfdump -debug-info - | FileCheck %s
22
; Radar 7833483
33
; Do not emit a separate out-of-line definition DIE for the function-local 'foo'
44
; function (member of the function local 'A' type)
55
; CHECK: DW_TAG_class_type
66
; CHECK: DW_TAG_class_type
7-
; CHECK-NEXT: DW_AT_name {{.*}} "A"
7+
; CHECK-NEXT: DW_AT_name ("A")
88
; Check that the subprogram inside the class definition has low_pc, only
99
; attached to the definition.
1010
; CHECK: [[FOO_INL:0x........]]: DW_TAG_subprogram
1111
; CHECK-NOT: DW_TAG
1212
; CHECK: DW_AT_low_pc
1313
; CHECK-NOT: DW_TAG
14-
; CHECK: DW_AT_name {{.*}} "foo"
14+
; CHECK: DW_AT_name ("foo")
1515
; And just double check that there's no out of line definition that references
1616
; this subprogram.
17-
; CHECK-NOT: DW_AT_specification {{.*}} {[[FOO_INL]]}
17+
; CHECK-NOT: DW_AT_specification ([[FOO_INL]]
1818

1919
%class.A = type { i8 }
2020
%class.B = type { i8 }

llvm/test/DebugInfo/Generic/PR20038.ll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; For some reason, the output when targetting sparc is not quite as expected.
22
; XFAIL: sparc
33

4-
; RUN: %llc_dwarf -O0 -filetype=obj -dwarf-linkage-names=All < %s | llvm-dwarfdump -v -debug-info - | FileCheck %s
4+
; RUN: %llc_dwarf -O0 -filetype=obj -dwarf-linkage-names=All < %s | llvm-dwarfdump -debug-info - | FileCheck %s
55

66
; IR generated from clang -O0 with:
77
; struct C {
@@ -13,23 +13,23 @@
1313

1414
; CHECK: DW_TAG_structure_type
1515
; CHECK-NOT: DW_TAG
16-
; CHECK: DW_AT_name {{.*}} "C"
16+
; CHECK: DW_AT_name ("C")
1717
; CHECK-NOT: {{DW_TAG|NULL}}
1818
; CHECK: DW_TAG_subprogram
1919
; CHECK-NOT: DW_TAG
20-
; CHECK: DW_AT_name {{.*}} "~C"
20+
; CHECK: DW_AT_name ("~C")
2121

2222
; CHECK: DW_TAG_subprogram
2323
; CHECK-NOT: DW_TAG
24-
; CHECK: DW_AT_linkage_name {{.*}} "_ZN1CD1Ev"
24+
; CHECK: DW_AT_linkage_name ("_ZN1CD1Ev")
2525
; CHECK-NOT: {{DW_TAG|NULL}}
2626
; CHECK: DW_TAG_formal_parameter
2727
; CHECK-NOT: DW_TAG
28-
; CHECK: DW_AT_name {{.*}} "this"
28+
; CHECK: DW_AT_name ("this")
2929

3030
; CHECK: DW_TAG_subprogram
3131
; CHECK-NOT: DW_TAG
32-
; CHECK: DW_AT_name {{.*}} "fun4"
32+
; CHECK: DW_AT_name ("fun4")
3333
; CHECK-NOT: {{DW_TAG|NULL}}
3434
; CHECK: DW_TAG_inlined_subroutine
3535
; CHECK-NOT: DW_TAG

llvm/test/DebugInfo/Generic/constant-pointers.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010

1111
; CHECK: DW_TAG_subprogram
1212
; CHECK: DW_TAG_template_value_parameter
13-
; CHECK: DW_AT_name {{.*}} "V"
13+
; CHECK: DW_AT_name {{.*}}"V"
1414
; CHECK: DW_AT_const_value [DW_FORM_udata] (0)
1515
; CHECK: DW_TAG_template_value_parameter
16-
; CHECK: DW_AT_name {{.*}} "F"
16+
; CHECK: DW_AT_name {{.*}}"F"
1717
; CHECK: DW_AT_const_value [DW_FORM_udata] (0)
1818

1919
; Function Attrs: nounwind uwtable

llvm/test/DebugInfo/Generic/containing-type-extension.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
; CHECK: [[SP:.*]]: DW_TAG_structure_type
66
; CHECK-NOT: TAG
77
; CHECK: DW_AT_containing_type [DW_FORM_ref4]
8-
; CHECK: DW_AT_name {{.*}}= "vtable")
8+
; CHECK: DW_AT_name {{.*}}"vtable"
99

1010
; The code doesn't actually matter.
1111
define i32 @main() #0 !dbg !4 {

llvm/test/DebugInfo/Generic/cross-cu-inlining.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
; definition in b.cpp's CU.
2121

2222
; CHECK: DW_TAG_compile_unit
23-
; CHECK: DW_AT_name {{.*}} "a.cpp"
23+
; CHECK: DW_AT_name {{.*}}"a.cpp"
2424
; CHECK: DW_TAG_subprogram
2525
; CHECK: DW_AT_type [DW_FORM_ref_addr] (0x00000000[[INT:[a-f0-9]+]]
2626
; CHECK: 0x[[INLINED:[0-9a-f]*]]:{{.*}}DW_TAG_inlined_subroutine
@@ -31,7 +31,7 @@
3131
; Check the abstract definition is in the 'b.cpp' CU and doesn't contain any
3232
; concrete information (address range or variable location)
3333
; CHECK: DW_TAG_compile_unit
34-
; CHECK: DW_AT_name {{.*}} "b.cpp"
34+
; CHECK: DW_AT_name {{.*}}"b.cpp"
3535
; CHECK: 0x[[ABS_FUNC]]: DW_TAG_subprogram
3636
; CHECK-NOT: DW_AT_low_pc
3737
; CHECK: 0x[[ABS_VAR]]: DW_TAG_formal_parameter
@@ -40,7 +40,7 @@
4040
; CHECK-NOT: DW_AT_location
4141

4242
; CHECK: 0x[[INT]]: DW_TAG_base_type
43-
; CHECK: DW_AT_name {{.*}} "int"
43+
; CHECK: DW_AT_name {{.*}}"int"
4444

4545
; Check the concrete out of line definition references the abstract and
4646
; provides the address range and variable location

llvm/test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump -v -debug-info - | FileCheck %s
1+
; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump -debug-info - | FileCheck %s
22

33
; Testing that two distinct (distinct by writing them in separate files, while
44
; still fulfilling C++'s ODR by having identical token sequences) functions,
@@ -27,13 +27,13 @@
2727
; The DISubprogram should show up in compile unit a.
2828
; CHECK: DW_TAG_compile_unit
2929
; CHECK-NOT: DW_TAG
30-
; CHECK: DW_AT_name {{.*}}"b.cpp"
30+
; CHECK: DW_AT_name ("b.cpp")
3131
; CHECK-NOT: DW_TAG_subprogram
3232

3333
; CHECK: DW_TAG_compile_unit
3434
; CHECK-NOT: DW_TAG
35-
; CHECK: DW_AT_name {{.*}}"a.cpp"
36-
; CHECK: DW_AT_name {{.*}} "func"
35+
; CHECK: DW_AT_name ("a.cpp")
36+
; CHECK: DW_AT_name ("func")
3737

3838
source_filename = "test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll"
3939

llvm/test/DebugInfo/Generic/cross-cu-linkonce.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump -v -debug-info - | FileCheck %s
1+
; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump -debug-info - | FileCheck %s
22

33
; Built from source:
44
; $ clang++ a.cpp b.cpp -g -c -emit-llvm
@@ -19,7 +19,7 @@
1919
; CHECK: DW_TAG_compile_unit
2020
; CHECK: DW_TAG_subprogram
2121
; CHECK-NOT: DW_TAG
22-
; CHECK: DW_AT_name {{.*}} "func"
22+
; CHECK: DW_AT_name ("func")
2323
; CHECK: DW_TAG_compile_unit
2424
; CHECK-NOT: DW_TAG_subprogram
2525

llvm/test/DebugInfo/Generic/dead-argument-order.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump -v -debug-info - | FileCheck %s
1+
; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump -debug-info - | FileCheck %s
22

33
; Built from the following source with clang -O1
44
; struct S { int i; };
@@ -13,11 +13,11 @@
1313

1414
; CHECK: DW_TAG_subprogram
1515
; CHECK-NOT: DW_TAG
16-
; CHECK: DW_AT_name {{.*}} "function"
16+
; CHECK: DW_AT_name ("function")
1717
; CHECK-NOT: {{DW_TAG|NULL}}
1818
; CHECK: DW_TAG_formal_parameter
1919
; CHECK-NOT: DW_TAG
20-
; CHECK: DW_AT_name {{.*}} "s"
20+
; CHECK: DW_AT_name ("s")
2121
; CHECK-NOT: DW_TAG
2222
; FIXME: Even though 's' is never reconstituted into a struct, the one member
2323
; variable is still live and used, and so we should be able to describe 's's
@@ -28,7 +28,7 @@
2828
; CHECK-NOT: DW_TAG
2929
; CHECK: DW_AT_location
3030
; CHECK-NOT: DW_TAG
31-
; CHECK: DW_AT_name {{.*}} "i"
31+
; CHECK: DW_AT_name ("i")
3232

3333

3434
%struct.S = type { i32 }

llvm/test/DebugInfo/Generic/disubrange_vla.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
; are emitted.
1212

1313
; CHECK: [[NODE:[0-9a-zA-Zx]+]]: DW_TAG_variable [4]
14-
; CHECK-NEXT: DW_AT_name {{.*}} "vla_expr"
14+
; CHECK-NEXT: DW_AT_name {{.*}}"vla_expr"
1515
; CHECK: DW_AT_count [DW_FORM_ref4] (cu + {{.*}} => {[[NODE]]})
1616

1717
define void @foo(i32 %n) !dbg !7 {

llvm/test/DebugInfo/Generic/enum-types.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77

88
; CHECK: DW_TAG_compile_unit
99
; CHECK: 0x[[ENUM:.*]]: DW_TAG_enumeration_type
10-
; CHECK-NEXT: DW_AT_name {{.*}} "EA"
10+
; CHECK-NEXT: DW_AT_name {{.*}}"EA"
1111
; CHECK: DW_TAG_subprogram
12-
; CHECK: DW_AT_MIPS_linkage_name {{.*}} "_Z4topA2EA"
12+
; CHECK: DW_AT_MIPS_linkage_name {{.*}}"_Z4topA2EA"
1313
; CHECK: DW_TAG_formal_parameter
1414
; CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x{{.*}} => {0x[[ENUM]]}
1515

1616
; CHECK: DW_TAG_compile_unit
1717
; CHECK: DW_TAG_subprogram
18-
; CHECK: DW_AT_MIPS_linkage_name {{.*}} "_Z4topB2EA"
18+
; CHECK: DW_AT_MIPS_linkage_name {{.*}}"_Z4topB2EA"
1919
; CHECK: DW_TAG_formal_parameter
2020
; CHECK: DW_AT_type [DW_FORM_ref_addr] {{.*}}[[ENUM]]
2121

0 commit comments

Comments
 (0)