Skip to content

Commit 0af9ceb

Browse files
committed
improve test further: empty loop
1 parent fe4a7d8 commit 0af9ceb

File tree

1 file changed

+15
-1
lines changed
  • clang/test/DebugInfo/KeyInstructions

1 file changed

+15
-1
lines changed

clang/test/DebugInfo/KeyInstructions/for.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,18 @@ void c(int A) {
8181
}
8282
}
8383

84+
void d() {
85+
// - Check the `for` keyword gets an atom group.
86+
// CHECK: entry:
87+
// CHECK-NEXT: br label %for.cond
88+
89+
// CHECK: for.cond:
90+
// CHECK: br label %for.cond, !dbg [[dG1R1:!.*]], !llvm.loop
91+
for ( ; ; )
92+
{
93+
}
94+
}
95+
8496
// CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
8597
// CHECK: [[G2R1]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)
8698
// CHECK: [[G3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1)
@@ -101,4 +113,6 @@ void c(int A) {
101113
// CHECK: [[cG1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
102114
// CHECK: [[cG3R1]] = !DILocation(line: 81,{{.*}} atomGroup: 3, atomRank: 1)
103115
// CHECK: [[cG2R2]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 2)
104-
// CHECK: [[cG2R1]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)
116+
// CHECK: [[cG2R1]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)
117+
118+
// CHECK: [[dG1R1]] = !DILocation(line: 91, column: 3, scope: ![[#]], atomGroup: 1, atomRank: 1)

0 commit comments

Comments
 (0)