Skip to content

Commit ab88feb

Browse files
committed
fix tests
1 parent 5ddda1d commit ab88feb

File tree

6 files changed

+23
-10
lines changed

6 files changed

+23
-10
lines changed

clang/test/DebugInfo/KeyInstructions/assign-scalar.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,4 @@ void fun() {
8484
// CHECK: [[load_i_loc]] = !DILocation(line: [[#]], column: [[#]], scope: ![[#]])
8585
// CHECK: [[G11R2]] = !DILocation({{.*}}, atomGroup: 11, atomRank: 2)
8686
// CHECK: [[G11R1]] = !DILocation({{.*}}, atomGroup: 11, atomRank: 1)
87-
// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]])
8887
// CHECK: [[RET]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]])

clang/test/DebugInfo/KeyInstructions/builtin.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,4 @@ void fun() {
8787
// CHECK: [[G15R3]] = !DILocation({{.*}}, atomGroup: 15, atomRank: 3)
8888
// CHECK: [[G15R2]] = !DILocation({{.*}}, atomGroup: 15, atomRank: 2)
8989
// CHECK: [[G15R1]] = !DILocation({{.*}}, atomGroup: 15, atomRank: 1)
90-
// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]])
9190
// CHECK: [[RET]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]])

clang/test/DebugInfo/KeyInstructions/complex.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,4 @@ void test() {
9696
// CHECK-C: [[G10R1]] = !DILocation({{.*}}, atomGroup: 10, atomRank: 1)
9797
// CHECK-C: [[G11R2]] = !DILocation({{.*}}, atomGroup: 11, atomRank: 2)
9898
// CHECK-C: [[G11R1]] = !DILocation({{.*}}, atomGroup: 11, atomRank: 1)
99-
// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]])
10099
// CHECK: [[RET]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]])

clang/test/DebugInfo/KeyInstructions/multi-func.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,17 @@
88

99
int g;
1010
// CHECK: store{{.*}}, !dbg [[AG:!.*]]
11+
// CHECK: ret{{.*}}, !dbg [[ARET:!.*]]
1112
void a() { g = 0; }
1213

1314
// CHECK: store{{.*}}, !dbg [[BG:!.*]]
15+
// CHECK: ret{{.*}}, !dbg [[BRET:!.*]]
1416
void b() { g = 0; }
1517

1618
// CHECK: [[A:!.*]] = distinct !DISubprogram(name: "a",
17-
// CHECK: [[AG]] = !DILocation(line: 11, scope: [[A]], atomGroup: 1, atomRank: 1)
19+
// CHECK: [[AG]] = !DILocation(line: 12, scope: [[A]], atomGroup: 1, atomRank: 1)
20+
// CHECK: [[ARET]] = !DILocation(line: 12, scope: [[A]], atomGroup: 2, atomRank: 1)
21+
1822
// CHECK: [[B:!.*]] = distinct !DISubprogram(name: "b",
19-
// CHECK: [[BG]] = !DILocation(line: 14, scope: [[B]], atomGroup: 1, atomRank: 1)
23+
// CHECK: [[BG]] = !DILocation(line: 16, scope: [[B]], atomGroup: 1, atomRank: 1)
24+
// CHECK: [[BRET]] = !DILocation(line: 16, scope: [[B]], atomGroup: 2, atomRank: 1)

clang/test/DebugInfo/KeyInstructions/return-va-arg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// RUN: %clang_cc1 -gkey-instructions -gno-column-info -x c++ %s -debug-info-kind=line-tables-only -emit-llvm -o - \
1+
// RUN: %clang_cc1 -triple x86_64-linux-gnu -gkey-instructions -gno-column-info -x c++ %s -debug-info-kind=line-tables-only -emit-llvm -o - \
22
// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank
33

4-
// RUN: %clang_cc1 -gkey-instructions -gno-column-info -x c %s -debug-info-kind=line-tables-only -emit-llvm -o - \
4+
// RUN: %clang_cc1 -triple x86_64-linux-gnu -gkey-instructions -gno-column-info -x c %s -debug-info-kind=line-tables-only -emit-llvm -o - \
55
// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank
66

77
typedef struct {

clang/test/DebugInfo/KeyInstructions/return.c

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// RUN: %clang_cc1 -gkey-instructions -gno-column-info -x c++ %s -debug-info-kind=line-tables-only -emit-llvm -o - \
1+
// RUN: %clang_cc1 -triple x86_64-linux-gnu -gkey-instructions -gno-column-info -x c++ %s -debug-info-kind=line-tables-only -emit-llvm -o - \
22
// RUN: | FileCheck %s --check-prefixes=CHECK,CHECK-CXX
33

4-
// RUN: %clang_cc1 -gkey-instructions -gno-column-info -x c %s -debug-info-kind=line-tables-only -emit-llvm -o - \
4+
// RUN: %clang_cc1 -triple x86_64-linux-gnu -gkey-instructions -gno-column-info -x c %s -debug-info-kind=line-tables-only -emit-llvm -o - \
55
// RUN: | FileCheck %s
66

77
// Check the stores to `retval` allocas and branches to `return` block are in
@@ -57,6 +57,7 @@ nomangle int d() { return g = 1; }
5757

5858
// The implicit return here get the line number of the closing brace; make it
5959
// key to match existing behaviour.
60+
// CHECK: void @e()
6061
// CHECK: ret void, !dbg [[E_G1R1:!.*]]
6162
nomangle void e() {}
6263

@@ -66,10 +67,17 @@ int &f(int &r) {
6667
// Include ctrl-flow to stop ret value store being elided.
6768
if (r)
6869
// CHECK-CXX: if.then:
69-
// CHECK-CXX-NEXT: %2 = load ptr, ptr %r.addr{{.*}}, !dbg [[F_G2R2:!.*]]
70+
// CHECK-CXX-NEXT: %2 = load ptr, ptr %r.addr{{.*}}, !dbg [[F_G2R2:!.*]], !nonnull
7071
// CHECK-CXX-NEXT: store ptr %2, ptr %retval{{.*}}, !dbg [[F_G2R1:!.*]]
7172
// CHECK-CXX-NEXT: br label %return, !dbg [[F_G2R1:!.*]]
7273
return r;
74+
75+
// CHECK-CXX: if.end:
76+
// CHECK-CXX-NEXT: store ptr @g, ptr %retval{{.*}}, !dbg [[F_G3R1:!.*]]
77+
// CHECK-CXX-NEXT: br label %return, !dbg [[F_G3R1:!.*]]
78+
// CHECK-CXX: return:
79+
// CHECK-CXX-NEXT: %3 = load ptr, ptr %retval{{.*}}, !dbg [[F_G4R2:!.*]]
80+
// CHECK-CXX-NEXT: ret ptr %3, !dbg [[F_G4R1:!.*]]
7381
return g;
7482
}
7583
#endif
@@ -88,3 +96,6 @@ int &f(int &r) {
8896
// CHECK: [[E_G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
8997
// CHECK-CXX: [[F_G2R2]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 2)
9098
// CHECK-CXX: [[F_G2R1]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)
99+
// CHECK-CXX: [[F_G3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1)
100+
// CHECK-CXX: [[F_G4R2]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 2)
101+
// CHECK-CXX: [[F_G4R1]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 1)

0 commit comments

Comments
 (0)