Skip to content

Commit ad4dfbc

Browse files
MrSidimsvmaksimo
authored andcommitted
[NFC] Align debug tests with recent LLVM community updates
75b622a "Reland [DwarfDebug] Support emitting function-local declaration for a lexical block" and 0ac75e8 "Reland [DwarfDebug] Move emission of global vars, types and imports to endModule()" Signed-off-by: Dmitry Sidorov <[email protected]> Original commit: KhronosGroup/SPIRV-LLVM-Translator@b75aff7
1 parent 8f8001a commit ad4dfbc

File tree

6 files changed

+16
-26
lines changed

6 files changed

+16
-26
lines changed

llvm-spirv/test/DebugInfo/Generic/imported-name-inlined.ll

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,17 @@ target triple = "spir64-unknown-unknown"
2222
; Ensure that top level imported declarations don't produce an extra degenerate
2323
; concrete subprogram definition.
2424

25-
; FIXME: imported entities should only be emitted to the abstract origin if one is present
26-
2725
; CHECK: DW_TAG_compile_unit
2826
; CHECK: DW_TAG_subprogram
2927
; CHECK: DW_AT_name {{.*}} "f1"
3028
; CHECK: DW_TAG_imported_declaration
3129
; CHECK: NULL
32-
; CHECK: DW_TAG_namespace
33-
; CHECK: DW_TAG_subprogram
34-
; CHECK: NULL
3530
; CHECK: DW_TAG_subprogram
3631
; CHECK: DW_AT_name {{.*}} "f2"
3732
; CHECK: DW_TAG_inlined_subroutine
38-
; CHECK: DW_TAG_imported_declaration
39-
; CHECK: NULL
33+
; CHECK: NULL
34+
; CHECK: DW_TAG_namespace
35+
; CHECK: DW_TAG_subprogram
4036
; CHECK: NULL
4137
; CHECK: NULL
4238

llvm-spirv/test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,17 @@ attributes #1 = { nounwind readnone }
5353

5454
; CHECK: DW_TAG_variable
5555
; CHECK-NOT: DW_TAG
56-
; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]*}}] = "GLB")
56+
; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]*}}] = "LOC")
5757
; CHECK-NOT: DW_TAG
58-
; CHECK: DW_AT_decl_file [DW_FORM_data1] ("/work/llvm/vanilla/test/DebugInfo{{[/\\]}}test.c")
58+
; CHECK: DW_AT_decl_file [DW_FORM_data1] ("/work/llvm/vanilla/test/DebugInfo{{[/\\]}}test.c")
5959
; CHECK-NOT: DW_TAG
60-
; CHECK: DW_AT_decl_line [DW_FORM_data1] (1)
60+
; CHECK: DW_AT_decl_line [DW_FORM_data1] (4)
6161

6262
; CHECK: DW_TAG_variable
6363
; CHECK-NOT: DW_TAG
64-
; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]*}}] = "LOC")
64+
; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]*}}] = "GLB")
6565
; CHECK-NOT: DW_TAG
66-
; CHECK: DW_AT_decl_file [DW_FORM_data1] ("/work/llvm/vanilla/test/DebugInfo{{[/\\]}}test.c")
66+
; CHECK: DW_AT_decl_file [DW_FORM_data1] ("/work/llvm/vanilla/test/DebugInfo{{[/\\]}}test.c")
6767
; CHECK-NOT: DW_TAG
68-
; CHECK: DW_AT_decl_line [DW_FORM_data1] (4)
68+
; CHECK: DW_AT_decl_line [DW_FORM_data1] (1)
6969

llvm-spirv/test/DebugInfo/X86/debug-info-access.ll

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@
3737
; A a;
3838
; B b;
3939
; U u;
40+
;
41+
; CHECK: DW_TAG_subprogram
42+
; CHECK: DW_AT_name {{.*}}"free")
43+
; CHECK-NOT: DW_AT_accessibility
4044

4145
; CHECK: DW_TAG_member
4246
; CHECK: DW_AT_name {{.*}}"pub_default_static")
@@ -80,12 +84,6 @@
8084
; CHECK: DW_TAG_subprogram
8185
; CHECK: DW_AT_name {{.*}}"union_pub_default")
8286
; CHECK: DW_AT_accessibility
83-
; CHECK: DW_TAG
84-
;
85-
; CHECK: DW_TAG_subprogram
86-
; CHECK: DW_AT_name {{.*}}"free")
87-
; CHECK-NOT: DW_AT_accessibility
88-
; CHECK-NOT: DW_TAG
8987
;
9088
; ModuleID = '/llvm/tools/clang/test/CodeGenCXX/debug-info-access.cpp'
9189
source_filename = "test/DebugInfo/X86/debug-info-access.ll"

llvm-spirv/test/DebugInfo/X86/dwarf-linkage-names.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ target triple = "spir64-unknown-unknown"
2424

2525
; This assumes the variable will appear before the function.
2626
; LINKAGE1: .section .debug_info
27-
; LINKAGE1: DW_TAG_variable
27+
; LINKAGE1: DW_TAG_subprogram
2828
; LINKAGE1-NOT: DW_TAG
2929
; LINKAGE1: {{DW_AT_(MIPS_)?linkage_name}}
30-
; LINKAGE1: DW_TAG_subprogram
30+
; LINKAGE1: DW_TAG_variable
3131
; LINKAGE1-NOT: DW_TAG
3232
; LINKAGE1: {{DW_AT_(MIPS_)?linkage_name}}
3333
; LINKAGE1: .section

llvm-spirv/test/DebugInfo/X86/lexical-block-file-inline.ll

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ target triple = "spir64-unknown-unknown"
3939
; CHECK: DW_TAG_lexical_block
4040
; CHECK-NOT: {{DW_TAG|NULL}}
4141
; CHECK: DW_TAG_variable
42-
; CHECK-NOT: {{DW_TAG|NULL}}
43-
; CHECK: DW_TAG_imported_module
4442

4543
;; Abstract "bar" function
4644
; CHECK: [[Offset_bar]]: DW_TAG_subprogram
@@ -67,8 +65,6 @@ target triple = "spir64-unknown-unknown"
6765
; CHECK: DW_TAG_lexical_block
6866
; CHECK-NOT: {{DW_TAG|NULL}}
6967
; CHECK: DW_TAG_variable
70-
; CHECK-NOT: {{DW_TAG|NULL}}
71-
; CHECK: DW_TAG_imported_module
7268

7369

7470
; Function Attrs: alwaysinline nounwind

llvm-spirv/test/DebugInfo/X86/linkage-name.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64"
99
target triple = "spir64-unknown-unknown"
1010

11-
; CHECK: DW_TAG_subprogram [9] *
11+
; CHECK: DW_TAG_subprogram [8] *
1212
; CHECK-NOT: DW_AT_{{(MIPS_)?}}linkage_name
1313
; CHECK: DW_AT_specification
1414

0 commit comments

Comments
 (0)