Skip to content

Commit 4c01be2

Browse files
committed
[HeterogeneousDWARF] Regenerate tests
Remove XFAILs now that llvm#135692 has landed and these tests can be regenerated.
1 parent f4e9d2a commit 4c01be2

8 files changed

+738
-755
lines changed

clang/test/CodeGen/debug-info-block-expr-heterogeneous-dwarf.c

Lines changed: 50 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,12 @@
22
// RUN: %clang_cc1 -fblocks -debug-info-kind=limited -gheterogeneous-dwarf -emit-llvm -disable-llvm-verifier -o - %s | FileCheck %s
33
// RUN: %clang_cc1 -DDEAD_CODE -fblocks -debug-info-kind=limited -gheterogeneous-dwarf -emit-llvm -disable-llvm-verifier -o - %s | FileCheck --check-prefix=DEADCODE %s
44

5-
// FIXME: Duplicate DIFiles are generated, and include absolute paths, breaking the test
6-
// XFAIL: *
7-
85
typedef void (^BlockTy)();
96
void escapeFunc(BlockTy);
107
typedef void (^BlockTy)();
118
void noEscapeFunc(__attribute__((noescape)) BlockTy);
129

13-
// Verify that the desired DIExpr are generated for escaping (i.e, not
10+
// Verify that the desired DIExpression are generated for escaping (i.e, not
1411
// 'noescape') blocks.
1512
// CHECK-LABEL: define dso_local void @test_escape_func(
1613
// CHECK-SAME: ) #[[ATTR0:[0-9]+]] !dbg [[DBG5:![0-9]+]] {
@@ -69,7 +66,7 @@ void test_escape_func() {
6966
escapeFunc(^{ (void)escape_var; });
7067
}
7168

72-
// Verify that the desired DIExpr are generated for noescape blocks.
69+
// Verify that the desired DIExpression are generated for noescape blocks.
7370
// CHECK-LABEL: define dso_local void @test_noescape_func(
7471
// CHECK-SAME: ) #[[ATTR0]] !dbg [[DBG34:![0-9]+]] {
7572
// CHECK-NEXT: [[ENTRY:.*:]]
@@ -117,7 +114,7 @@ void test_noescape_func() {
117114
noEscapeFunc(^{ (void)noescape_var; });
118115
}
119116

120-
// Verify that the desired DIExpr are generated for blocks.
117+
// Verify that the desired DIExpression are generated for blocks.
121118
// CHECK-LABEL: define dso_local void @test_local_block(
122119
// CHECK-SAME: ) #[[ATTR0]] !dbg [[DBG45:![0-9]+]] {
123120
// CHECK-NEXT: [[ENTRY:.*:]]
@@ -191,7 +188,7 @@ void test_local_block() {
191188
^ { block_var = 1; }();
192189
}
193190

194-
// Verify that the desired DIExpr are generated for __block vars not used
191+
// Verify that the desired DIExpression are generated for __block vars not used
195192
// in any block.
196193
// CHECK-LABEL: define dso_local void @test_unused(
197194
// CHECK-SAME: ) #[[ATTR0]] !dbg [[DBG56:![0-9]+]] {
@@ -222,66 +219,66 @@ void test_unused() {
222219

223220
//.
224221
// CHECK: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C11, file: [[META1:![0-9]+]], producer: "{{.*}}clang version {{.*}}", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)
225-
// CHECK: [[META1]] = !DIFile(filename: "clang/test/CodeGen/<stdin>", directory: {{.*}})
226-
// CHECK: [[DBG5]] = distinct !DISubprogram(name: "test_escape_func", scope: [[META6:![0-9]+]], file: [[META6]], line: 11, type: [[META7:![0-9]+]], scopeLine: 11, spFlags: DISPFlagDefinition, unit: [[META0]], retainedNodes: [[META9:![0-9]+]])
227-
// CHECK: [[META6]] = !DIFile(filename: "clang/test/CodeGen/debug-info-block-expr-heterogeneous-dwarf.c", directory: {{.*}})
222+
// CHECK: [[META1]] = !DIFile(filename: "{{.*}}<stdin>", directory: {{.*}})
223+
// CHECK: [[DBG5]] = distinct !DISubprogram(name: "test_escape_func", scope: [[META6:![0-9]+]], file: [[META6]], line: 60, type: [[META7:![0-9]+]], scopeLine: 60, spFlags: DISPFlagDefinition, unit: [[META0]], retainedNodes: [[META9:![0-9]+]])
224+
// CHECK: [[META6]] = !DIFile(filename: "{{.*}}debug-info-block-expr-heterogeneous-dwarf.c", directory: {{.*}})
228225
// CHECK: [[META7]] = !DISubroutineType(types: [[META8:![0-9]+]])
229226
// CHECK: [[META8]] = !{null}
230227
// CHECK: [[META9]] = !{[[META10]]}
231-
// CHECK: [[META10]] = !DILocalVariable(name: "escape_var", scope: [[DBG5]], file: [[META6]], line: 14, type: [[META11:![0-9]+]])
228+
// CHECK: [[META10]] = !DILocalVariable(name: "escape_var", scope: [[DBG5]], file: [[META6]], line: 61, type: [[META11:![0-9]+]])
232229
// CHECK: [[META11]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
233-
// CHECK: [[META12]] = !DILocation(line: 14, column: 15, scope: [[DBG5]])
234-
// CHECK: [[DBG13]] = !DILocation(line: 19, column: 14, scope: [[DBG5]])
235-
// CHECK: [[DBG14]] = !DILocation(line: 19, column: 3, scope: [[DBG5]])
236-
// CHECK: [[DBG15]] = !DILocation(line: 20, column: 1, scope: [[DBG5]])
237-
// CHECK: [[DBG34]] = distinct !DISubprogram(name: "test_noescape_func", scope: [[META6]], file: [[META6]], line: 23, type: [[META7]], scopeLine: 23, spFlags: DISPFlagDefinition, unit: [[META0]], retainedNodes: [[META35:![0-9]+]])
230+
// CHECK: [[META12]] = !DILocation(line: 61, column: 15, scope: [[DBG5]])
231+
// CHECK: [[DBG13]] = !DILocation(line: 66, column: 14, scope: [[DBG5]])
232+
// CHECK: [[DBG14]] = !DILocation(line: 66, column: 3, scope: [[DBG5]])
233+
// CHECK: [[DBG15]] = !DILocation(line: 67, column: 1, scope: [[DBG5]])
234+
// CHECK: [[DBG34]] = distinct !DISubprogram(name: "test_noescape_func", scope: [[META6]], file: [[META6]], line: 112, type: [[META7]], scopeLine: 112, spFlags: DISPFlagDefinition, unit: [[META0]], retainedNodes: [[META35:![0-9]+]])
238235
// CHECK: [[META35]] = !{[[META36]]}
239-
// CHECK: [[META36]] = !DILocalVariable(name: "noescape_var", scope: [[DBG34]], file: [[META6]], line: 26, type: [[META11]])
240-
// CHECK: [[META37]] = !DILocation(line: 26, column: 15, scope: [[DBG34]])
241-
// CHECK: [[DBG38]] = !DILocation(line: 27, column: 16, scope: [[DBG34]])
242-
// CHECK: [[DBG39]] = !DILocation(line: 27, column: 3, scope: [[DBG34]])
243-
// CHECK: [[DBG40]] = !DILocation(line: 28, column: 1, scope: [[DBG34]])
244-
// CHECK: [[DBG45]] = distinct !DISubprogram(name: "test_local_block", scope: [[META6]], file: [[META6]], line: 31, type: [[META7]], scopeLine: 31, spFlags: DISPFlagDefinition, unit: [[META0]], retainedNodes: [[META46:![0-9]+]])
236+
// CHECK: [[META36]] = !DILocalVariable(name: "noescape_var", scope: [[DBG34]], file: [[META6]], line: 113, type: [[META11]])
237+
// CHECK: [[META37]] = !DILocation(line: 113, column: 15, scope: [[DBG34]])
238+
// CHECK: [[DBG38]] = !DILocation(line: 114, column: 16, scope: [[DBG34]])
239+
// CHECK: [[DBG39]] = !DILocation(line: 114, column: 3, scope: [[DBG34]])
240+
// CHECK: [[DBG40]] = !DILocation(line: 115, column: 1, scope: [[DBG34]])
241+
// CHECK: [[DBG45]] = distinct !DISubprogram(name: "test_local_block", scope: [[META6]], file: [[META6]], line: 184, type: [[META7]], scopeLine: 184, spFlags: DISPFlagDefinition, unit: [[META0]], retainedNodes: [[META46:![0-9]+]])
245242
// CHECK: [[META46]] = !{[[META47]]}
246-
// CHECK: [[META47]] = !DILocalVariable(name: "block_var", scope: [[DBG45]], file: [[META6]], line: 34, type: [[META11]])
247-
// CHECK: [[META48]] = !DILocation(line: 34, column: 15, scope: [[DBG45]])
248-
// CHECK: [[DBG49]] = !DILocation(line: 39, column: 3, scope: [[DBG45]])
249-
// CHECK: [[DBG50]] = !DILocation(line: 40, column: 1, scope: [[DBG45]])
250-
// CHECK: [[DBG56]] = distinct !DISubprogram(name: "test_unused", scope: [[META6]], file: [[META6]], line: 44, type: [[META7]], scopeLine: 44, spFlags: DISPFlagDefinition, unit: [[META0]], retainedNodes: [[META57:![0-9]+]])
243+
// CHECK: [[META47]] = !DILocalVariable(name: "block_var", scope: [[DBG45]], file: [[META6]], line: 185, type: [[META11]])
244+
// CHECK: [[META48]] = !DILocation(line: 185, column: 15, scope: [[DBG45]])
245+
// CHECK: [[DBG49]] = !DILocation(line: 188, column: 3, scope: [[DBG45]])
246+
// CHECK: [[DBG50]] = !DILocation(line: 189, column: 1, scope: [[DBG45]])
247+
// CHECK: [[DBG56]] = distinct !DISubprogram(name: "test_unused", scope: [[META6]], file: [[META6]], line: 213, type: [[META7]], scopeLine: 213, spFlags: DISPFlagDefinition, unit: [[META0]], retainedNodes: [[META57:![0-9]+]])
251248
// CHECK: [[META57]] = !{[[META58]]}
252-
// CHECK: [[META58]] = !DILocalVariable(name: "unused_var", scope: [[DBG56]], file: [[META6]], line: 47, type: [[META11]])
253-
// CHECK: [[META59]] = !DILocation(line: 47, column: 15, scope: [[DBG56]])
254-
// CHECK: [[DBG60]] = !DILocation(line: 49, column: 3, scope: [[DBG56]])
255-
// CHECK: [[DBG61]] = !DILocation(line: 50, column: 1, scope: [[DBG56]])
249+
// CHECK: [[META58]] = !DILocalVariable(name: "unused_var", scope: [[DBG56]], file: [[META6]], line: 214, type: [[META11]])
250+
// CHECK: [[META59]] = !DILocation(line: 214, column: 15, scope: [[DBG56]])
251+
// CHECK: [[DBG60]] = !DILocation(line: 216, column: 3, scope: [[DBG56]])
252+
// CHECK: [[DBG61]] = !DILocation(line: 217, column: 1, scope: [[DBG56]])
256253
//.
257254
// DEADCODE: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C11, file: [[META1:![0-9]+]], producer: "{{.*}}clang version {{.*}}", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)
258-
// DEADCODE: [[META1]] = !DIFile(filename: "clang/test/CodeGen/<stdin>", directory: {{.*}})
259-
// DEADCODE: [[DBG5]] = distinct !DISubprogram(name: "test_escape_func", scope: [[META6:![0-9]+]], file: [[META6]], line: 11, type: [[META7:![0-9]+]], scopeLine: 11, spFlags: DISPFlagDefinition, unit: [[META0]], retainedNodes: [[META9:![0-9]+]])
260-
// DEADCODE: [[META6]] = !DIFile(filename: "clang/test/CodeGen/debug-info-block-expr-heterogeneous-dwarf.c", directory: {{.*}})
255+
// DEADCODE: [[META1]] = !DIFile(filename: "{{.*}}<stdin>", directory: {{.*}})
256+
// DEADCODE: [[DBG5]] = distinct !DISubprogram(name: "test_escape_func", scope: [[META6:![0-9]+]], file: [[META6]], line: 60, type: [[META7:![0-9]+]], scopeLine: 60, spFlags: DISPFlagDefinition, unit: [[META0]], retainedNodes: [[META9:![0-9]+]])
257+
// DEADCODE: [[META6]] = !DIFile(filename: "{{.*}}debug-info-block-expr-heterogeneous-dwarf.c", directory: {{.*}})
261258
// DEADCODE: [[META7]] = !DISubroutineType(types: [[META8:![0-9]+]])
262259
// DEADCODE: [[META8]] = !{null}
263260
// DEADCODE: [[META9]] = !{[[META10]]}
264-
// DEADCODE: [[META10]] = !DILocalVariable(name: "escape_var", scope: [[DBG5]], file: [[META6]], line: 14, type: [[META11:![0-9]+]])
261+
// DEADCODE: [[META10]] = !DILocalVariable(name: "escape_var", scope: [[DBG5]], file: [[META6]], line: 61, type: [[META11:![0-9]+]])
265262
// DEADCODE: [[META11]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
266-
// DEADCODE: [[META12]] = !DILocation(line: 14, column: 15, scope: [[DBG5]])
267-
// DEADCODE: [[DBG13]] = !DILocation(line: 20, column: 1, scope: [[DBG5]])
268-
// DEADCODE: [[DBG14]] = distinct !DISubprogram(name: "test_noescape_func", scope: [[META6]], file: [[META6]], line: 23, type: [[META7]], scopeLine: 23, spFlags: DISPFlagDefinition, unit: [[META0]], retainedNodes: [[META15:![0-9]+]])
263+
// DEADCODE: [[META12]] = !DILocation(line: 61, column: 15, scope: [[DBG5]])
264+
// DEADCODE: [[DBG13]] = !DILocation(line: 67, column: 1, scope: [[DBG5]])
265+
// DEADCODE: [[DBG14]] = distinct !DISubprogram(name: "test_noescape_func", scope: [[META6]], file: [[META6]], line: 112, type: [[META7]], scopeLine: 112, spFlags: DISPFlagDefinition, unit: [[META0]], retainedNodes: [[META15:![0-9]+]])
269266
// DEADCODE: [[META15]] = !{[[META16]]}
270-
// DEADCODE: [[META16]] = !DILocalVariable(name: "noescape_var", scope: [[DBG14]], file: [[META6]], line: 26, type: [[META11]])
271-
// DEADCODE: [[META17]] = !DILocation(line: 26, column: 15, scope: [[DBG14]])
272-
// DEADCODE: [[DBG18]] = !DILocation(line: 27, column: 16, scope: [[DBG14]])
273-
// DEADCODE: [[DBG19]] = !DILocation(line: 27, column: 3, scope: [[DBG14]])
274-
// DEADCODE: [[DBG20]] = !DILocation(line: 28, column: 1, scope: [[DBG14]])
275-
// DEADCODE: [[DBG28]] = distinct !DISubprogram(name: "test_local_block", scope: [[META6]], file: [[META6]], line: 31, type: [[META7]], scopeLine: 31, spFlags: DISPFlagDefinition, unit: [[META0]], retainedNodes: [[META29:![0-9]+]])
267+
// DEADCODE: [[META16]] = !DILocalVariable(name: "noescape_var", scope: [[DBG14]], file: [[META6]], line: 113, type: [[META11]])
268+
// DEADCODE: [[META17]] = !DILocation(line: 113, column: 15, scope: [[DBG14]])
269+
// DEADCODE: [[DBG18]] = !DILocation(line: 114, column: 16, scope: [[DBG14]])
270+
// DEADCODE: [[DBG19]] = !DILocation(line: 114, column: 3, scope: [[DBG14]])
271+
// DEADCODE: [[DBG20]] = !DILocation(line: 115, column: 1, scope: [[DBG14]])
272+
// DEADCODE: [[DBG28]] = distinct !DISubprogram(name: "test_local_block", scope: [[META6]], file: [[META6]], line: 184, type: [[META7]], scopeLine: 184, spFlags: DISPFlagDefinition, unit: [[META0]], retainedNodes: [[META29:![0-9]+]])
276273
// DEADCODE: [[META29]] = !{[[META30]]}
277-
// DEADCODE: [[META30]] = !DILocalVariable(name: "block_var", scope: [[DBG28]], file: [[META6]], line: 34, type: [[META11]])
278-
// DEADCODE: [[META31]] = !DILocation(line: 34, column: 15, scope: [[DBG28]])
279-
// DEADCODE: [[DBG32]] = !DILocation(line: 39, column: 3, scope: [[DBG28]])
280-
// DEADCODE: [[DBG33]] = !DILocation(line: 40, column: 1, scope: [[DBG28]])
281-
// DEADCODE: [[DBG50]] = distinct !DISubprogram(name: "test_unused", scope: [[META6]], file: [[META6]], line: 44, type: [[META7]], scopeLine: 44, spFlags: DISPFlagDefinition, unit: [[META0]], retainedNodes: [[META51:![0-9]+]])
274+
// DEADCODE: [[META30]] = !DILocalVariable(name: "block_var", scope: [[DBG28]], file: [[META6]], line: 185, type: [[META11]])
275+
// DEADCODE: [[META31]] = !DILocation(line: 185, column: 15, scope: [[DBG28]])
276+
// DEADCODE: [[DBG32]] = !DILocation(line: 188, column: 3, scope: [[DBG28]])
277+
// DEADCODE: [[DBG33]] = !DILocation(line: 189, column: 1, scope: [[DBG28]])
278+
// DEADCODE: [[DBG50]] = distinct !DISubprogram(name: "test_unused", scope: [[META6]], file: [[META6]], line: 213, type: [[META7]], scopeLine: 213, spFlags: DISPFlagDefinition, unit: [[META0]], retainedNodes: [[META51:![0-9]+]])
282279
// DEADCODE: [[META51]] = !{[[META52]]}
283-
// DEADCODE: [[META52]] = !DILocalVariable(name: "unused_var", scope: [[DBG50]], file: [[META6]], line: 47, type: [[META11]])
284-
// DEADCODE: [[META53]] = !DILocation(line: 47, column: 15, scope: [[DBG50]])
285-
// DEADCODE: [[DBG54]] = !DILocation(line: 49, column: 3, scope: [[DBG50]])
286-
// DEADCODE: [[DBG55]] = !DILocation(line: 50, column: 1, scope: [[DBG50]])
280+
// DEADCODE: [[META52]] = !DILocalVariable(name: "unused_var", scope: [[DBG50]], file: [[META6]], line: 214, type: [[META11]])
281+
// DEADCODE: [[META53]] = !DILocation(line: 214, column: 15, scope: [[DBG50]])
282+
// DEADCODE: [[DBG54]] = !DILocation(line: 216, column: 3, scope: [[DBG50]])
283+
// DEADCODE: [[DBG55]] = !DILocation(line: 217, column: 1, scope: [[DBG50]])
287284
//.

0 commit comments

Comments
 (0)