mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Recent versions of LLDB can deal with line 0 locations much better and due to a subtle bug in the heuristic instructions immediately following the prologue could end up without debug locations which can cause serious problems for the LLVM inliner when constructing inline debug scope info. <rdar://problem/24394944>
13 lines
482 B
Swift
13 lines
482 B
Swift
// RUN: %target-swift-frontend -g -emit-ir %s | FileCheck %s
|
|
|
|
// Verify that variables bound in the for statements are in distinct scopes.
|
|
|
|
for var i = 0; i < 3; i += 1 {
|
|
// CHECK: ![[SCOPE1:[0-9]+]] = {{.*}}Block(scope: ![[MAIN:[0-9]+]],{{.*}}line: 5
|
|
// CHECK: !DILocalVariable(name: "i", scope: ![[SCOPE1]]
|
|
}
|
|
for var i = 0; i < 3; i += 1 {
|
|
// CHECK: ![[SCOPE2:[0-9]+]] = {{.*}}Block(scope: ![[MAIN:[0-9]+]],{{.*}}line: 9
|
|
// CHECK: !DILocalVariable(name: "i", scope: ![[SCOPE2]]
|
|
}
|