Skip to content

Commit 689c1b1

Browse files
committed
update new tests after rebase too
1 parent 3dd3e9c commit 689c1b1

File tree

8 files changed

+33
-7
lines changed

8 files changed

+33
-7
lines changed

clang/test/DebugInfo/KeyInstructions/cast.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ void a() {
1313
// CHECK: %conv = fptosi float %0 to i32{{.*}}, !dbg [[G1R2:!.*]]
1414
// CHECK: store i32 %conv, ptr %a{{.*}}, !dbg [[G1R1:!.*]]
1515
int a = g;
16+
// CHECK: ret{{.*}}, !dbg [[RET:!.*]]
1617
}
1718

1819
// CHECK: [[G1R3]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 3)
1920
// CHECK: [[G1R2]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2)
2021
// CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
22+
// CHECK: [[RET]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)

clang/test/DebugInfo/KeyInstructions/coerced-packed.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ void f() {
1414
// CHECK: [[call:%.*]] = call i40{{.*}}getS{{.*}}, !dbg [[G1R2:!.*]]
1515
// CHECK: store i40 [[call]], ptr %s, align 1, !dbg [[G1R1:!.*]]
1616
S s = getS();
17+
// CHECK: ret{{.*}}, !dbg [[RET:!.*]]
1718
}
1819

1920
// CHECK: [[G1R2]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2)
2021
// CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
22+
// CHECK: [[RET]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)

clang/test/DebugInfo/KeyInstructions/coerced-ptr.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ void f() {
1212
// CHECK: [[i2p:%.*]] = inttoptr i64 %call to ptr, !dbg [[G1R2:!.*]]
1313
// CHECK: store ptr [[i2p]], ptr [[gep]], align 8, !dbg [[G1R1:!.*]]
1414
Ptr p = getPtr();
15+
// CHECK: ret{{.*}}, !dbg [[RET:!.*]]
1516
}
1617

1718
// CHECK: [[G1R3]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 3)
1819
// CHECK: [[G1R2]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2)
1920
// CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
21+
// CHECK: [[RET]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)

clang/test/DebugInfo/KeyInstructions/coerced-through-memory.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ void f() {
1818
// CHECK: store [2 x i64] %call, ptr %tmp.coerce, align 8
1919
// CHECK: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %s, ptr align 8 %tmp.coerce, i64 12, i1 false), !dbg [[G1R1:!.*]]
2020
S s = getS();
21+
// CHECK: ret{{.*}}, !dbg [[RET:!.*]]
2122
}
2223

2324
// CHECK: [[G1R2]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2)
2425
// CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
26+
// CHECK: [[RET]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)

clang/test/DebugInfo/KeyInstructions/coerced.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ void test() {
1616
// CHECK: %3 = extractvalue { ptr, ptr } %call, 1, !dbg [[G1R2]]
1717
// CHECK: store ptr %3, ptr {{.*}}, !dbg [[G1R1:!.*]]
1818
Struct s = get();
19+
// CHECK: ret{{.*}}, !dbg [[RET:!.*]]
1920
}
2021

2122
typedef struct { int i; } Int;
@@ -27,10 +28,13 @@ void test2() {
2728
// CHECK: %call = call i32 @{{(_Z6)?}}getInt{{v?}}(), !dbg [[T2_G1R2:!.*]]
2829
// CHECK: [[gep:%.*]] = getelementptr inbounds nuw %struct.Int, ptr %i, i32 0, i32 0
2930
// CHECK: store i32 %call, ptr [[gep]]{{.*}}, !dbg [[T2_G1R1:!.*]]
31+
// CHECK: ret{{.*}}, !dbg [[T2_RET:!.*]]
3032
Int i = getInt();
3133
}
3234

3335
// CHECK: [[G1R2]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2)
3436
// CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
37+
// CHECK: [[RET]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)
3538
// CHECK: [[T2_G1R2]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2)
3639
// CHECK: [[T2_G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
40+
// CHECK: [[T2_RET]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)

clang/test/DebugInfo/KeyInstructions/for.c

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ void a(int A) {
2727
// CHECK: store i32 %inc, ptr %i{{.*}}, !dbg [[G4R1:!.*]]
2828
for (int i = 0; i < A; ++i) {
2929
}
30+
// CHECK: ret{{.*}}, !dbg [[RET:!.*]]
3031
}
3132

3233
void b(int A) {
@@ -55,6 +56,7 @@ void b(int A) {
5556
if (A > 1)
5657
;
5758
}
59+
// CHECK: ret{{.*}}, !dbg [[bRET:!.*]]
5860
}
5961

6062
void c(int A) {
@@ -111,6 +113,7 @@ void e() {
111113
// CHECK-NEXT: br label %for.inc, !dbg [[eG4R1:!.*]]
112114
for (; i < 3; ee())
113115
x = i;
116+
// CHECK: ret{{.*}}, !dbg [[eRET:!.*]]
114117
}
115118

116119

@@ -138,6 +141,7 @@ void g() {
138141
{
139142
break;
140143
}
144+
// CHECK: ret{{.*}}, !dbg [[gRET:!.*]]
141145
}
142146

143147
// CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
@@ -146,30 +150,34 @@ void g() {
146150
// CHECK: [[G5R1]] = !DILocation(line: 29,{{.*}} atomGroup: 5, atomRank: 1)
147151
// CHECK: [[G4R2]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 2)
148152
// CHECK: [[G4R1]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 1)
153+
// CHECK: [[RET]] = !DILocation({{.*}}, atomGroup: 6, atomRank: 1)
149154

150155
// CHECK: [[bG1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
151156
// CHECK: [[bG2R1]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)
152157
// CHECK: [[bG3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1)
153158
// CHECK: [[bG4R2]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 2)
154159
// CHECK: [[bG4R1]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 1)
155-
// CHECK: [[bG6R1]] = !DILocation(line: 57,{{.*}} atomGroup: 6, atomRank: 1)
160+
// CHECK: [[bG6R1]] = !DILocation(line: 58,{{.*}} atomGroup: 6, atomRank: 1)
156161
// CHECK: [[bG5R2]] = !DILocation({{.*}}, atomGroup: 5, atomRank: 2)
157162
// CHECK: [[bG5R1]] = !DILocation({{.*}}, atomGroup: 5, atomRank: 1)
163+
// CHECK: [[bRET]] = !DILocation({{.*}}, atomGroup: 7, atomRank: 1)
158164

159165
// CHECK: [[cG1R2]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2)
160166
// CHECK: [[cG1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
161-
// CHECK: [[cG3R1]] = !DILocation(line: 81,{{.*}} atomGroup: 3, atomRank: 1)
167+
// CHECK: [[cG3R1]] = !DILocation(line: 83,{{.*}} atomGroup: 3, atomRank: 1)
162168
// CHECK: [[cG2R2]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 2)
163169
// CHECK: [[cG2R1]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)
164170

165-
// CHECK: [[dG1R1]] = !DILocation(line: 91, column: 3, scope: ![[#]], atomGroup: 1, atomRank: 1)
171+
// CHECK: [[dG1R1]] = !DILocation(line: 93, column: 3, scope: ![[#]], atomGroup: 1, atomRank: 1)
166172

167173
// CHECK: [[eG1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
168174
// CHECK: [[eG2R1]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)
169175
// CHECK: [[eG3R2]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 2)
170176
// CHECK: [[eG3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1)
171-
// CHECK: [[eG4R1]] = !DILocation(line: 113, column: 5, scope: ![[#]], atomGroup: 4, atomRank: 1)
177+
// CHECK: [[eG4R1]] = !DILocation(line: 115, column: 5, scope: ![[#]], atomGroup: 4, atomRank: 1)
178+
// CHECK: [[eRET]] = !DILocation({{.*}}, atomGroup: 5, atomRank: 1)
172179

173-
// CHECK: [[fG1R1]] = !DILocation(line: 126, column: 5, scope: ![[#]], atomGroup: 1, atomRank: 1)
180+
// CHECK: [[fG1R1]] = !DILocation(line: 129, column: 5, scope: ![[#]], atomGroup: 1, atomRank: 1)
174181

175-
// CHECK: [[gG1R1]] = !DILocation(line: 139, column: 5, scope: ![[#]], atomGroup: 1, atomRank: 1)
182+
// CHECK: [[gG1R1]] = !DILocation(line: 142, column: 5, scope: ![[#]], atomGroup: 1, atomRank: 1)
183+
// CHECK: [[gRET]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)

clang/test/DebugInfo/KeyInstructions/new.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ void f(int x) {
1818
// CHECK: %3 = load ptr, ptr %n
1919
// CHECK: store i32 %2, ptr %3{{.*}}, !dbg [[G3R1:!.*]]
2020
*n = x;
21+
// CHECK: ret{{.*}}, !dbg [[RET:!.*]]
2122
}
2223

2324
// CHECK: [[G1R2_C12]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2)
@@ -32,3 +33,5 @@ void f(int x) {
3233

3334
// CHECK: [[G3R2]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 2)
3435
// CHECK: [[G3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1)
36+
37+
// CHECK: [[RET]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 1)

clang/test/DebugInfo/KeyInstructions/switch.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank --check-prefixes=CHECK,CHECK-CXX
33

44
// RUN: %clang_cc1 -triple x86_64-linux-gnu -gkey-instructions -x c %s -debug-info-kind=line-tables-only -emit-llvm -o - \
5-
// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank
5+
// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank --check-prefixes=CHECK,CHECK-C
66

77
int g;
88
void a(int A, int B) {
@@ -40,6 +40,7 @@ void a(int A, int B) {
4040
}
4141
};
4242
}
43+
// CHECK: ret{{.*}}, !dbg [[RET:!.*]]
4344
}
4445

4546
// CHECK: [[G2R2]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 2)
@@ -49,3 +50,5 @@ void a(int A, int B) {
4950
// CHECK: [[G4R2]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 2)
5051
// CHECK: [[G4R1]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 1)
5152
// CHECK-CXX: [[G5R1]] = !DILocation({{.*}}, atomGroup: 5, atomRank: 1)
53+
// CHECK-CXX: [[RET]] = !DILocation({{.*}}, atomGroup: 6, atomRank: 1)
54+
// CHECK-C: [[RET]] = !DILocation({{.*}}, atomGroup: 5, atomRank: 1)

0 commit comments

Comments
 (0)