File tree Expand file tree Collapse file tree 6 files changed +7
-5
lines changed Expand file tree Collapse file tree 6 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -1487,6 +1487,8 @@ void SILGenModule::visitTopLevelCodeDecl(TopLevelCodeDecl *td) {
1487
1487
1488
1488
TopLevelSGF->emitProfilerIncrement (td->getBody ());
1489
1489
1490
+ DebugScope DS (*TopLevelSGF, CleanupLocation (td));
1491
+
1490
1492
for (auto &ESD : td->getBody ()->getElements ()) {
1491
1493
if (!TopLevelSGF->B .hasValidInsertionPoint ()) {
1492
1494
if (auto *S = ESD.dyn_cast <Stmt*>()) {
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ for i in 0 ..< 3 {
7
7
}
8
8
9
9
for i in 0 ..< 3 {
10
- // CHECK-DAG: ![[SCOPE2:[0-9]+]] = {{.*}}Block(scope: ![[MAIN ]],{{.*}}line: [[@LINE-1]]
10
+ // CHECK-DAG: ![[SCOPE2:[0-9]+]] = {{.*}}Block(scope: ![[MAIN2:[0-9]+ ]],{{.*}}line: [[@LINE-1]]
11
11
// CHECK-DAG: !DILocalVariable(name: "i", scope: ![[SCOPE1]]
12
12
// CHECK-DAG: !DILocalVariable(name: "i", scope: ![[SCOPE2]]
13
13
}
Original file line number Diff line number Diff line change 3
3
// Verify that variables bound in the foreach statements are in distinct scopes.
4
4
let values = [ 1 , 2 , 3 ]
5
5
// CHECK-DAG: ![[SCOPE1:[0-9]+]] ={{.*}}Block(scope: ![[MAIN:[0-9]+]],{{.*}}line: 7,
6
- // CHECK-DAG: ![[SCOPE2:[0-9]+]] ={{.*}}Block(scope: ![[MAIN ]], {{.*}}line: 10,
6
+ // CHECK-DAG: ![[SCOPE2:[0-9]+]] ={{.*}}Block(scope: ![[MAIN2:[0-9]+ ]], {{.*}}line: 10,
7
7
for val in values {
8
8
// CHECK-DAG: !DILocalVariable(name: "val", scope: ![[SCOPE1]]
9
9
}
Original file line number Diff line number Diff line change @@ -9,5 +9,5 @@ if let val = yieldValue() {
9
9
}
10
10
if let val = yieldValue ( ) {
11
11
// CHECK: !DILocalVariable(name: "val", scope: ![[SCOPE2:[0-9]+]]
12
- // CHECK: ![[SCOPE2]] = distinct !DILexicalBlock(scope: ![[MAIN ]]
12
+ // CHECK: ![[SCOPE2]] = distinct !DILexicalBlock(scope: ![[MAIN2:[0-9]+ ]]
13
13
}
Original file line number Diff line number Diff line change 22
22
// CHECK-NEXT: !dbg ![[ZERO]]
23
23
// CHECK-NEXT: }
24
24
25
+ // CHECK: ![[FILE:[0-9]+]] = {{.*}}"<compiler-generated>"
25
26
// CHECK: ![[SP]] = {{.*}}name: "transparent"
26
27
// CHECK-SAME: file: ![[FILE:[0-9]+]]
27
28
// CHECK-NOT: line:
28
- // CHECK: ![[FILE]] = {{.*}}"<compiler-generated>"
29
29
// CHECK: ![[ZERO]] = !DILocation(line: 0,
Original file line number Diff line number Diff line change @@ -9,5 +9,5 @@ while let val = yieldValues() {
9
9
}
10
10
while let val = yieldValues ( ) {
11
11
// CHECK: !DILocalVariable(name: "val", scope: ![[SCOPE2:[0-9]+]]
12
- // CHECK: ![[SCOPE2]] = distinct !DILexicalBlock(scope: ![[MAIN ]]
12
+ // CHECK: ![[SCOPE2]] = distinct !DILexicalBlock(scope: ![[MAIN2:[0-9]+ ]]
13
13
}
You can’t perform that action at this time.
0 commit comments