mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Applied the upgrade script from r236120 (LLVM) and r236121 (CFE). This is the final step of rdar://problem/20434113. Swift SVN r27925
16 lines
516 B
Swift
16 lines
516 B
Swift
// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | FileCheck %s
|
|
|
|
// Test debug info for storageless variables.
|
|
struct Symbol {}
|
|
func peek() -> Symbol? { return Symbol() }
|
|
|
|
func foo() {
|
|
// CHECK: define {{.*}}foo
|
|
// CHECK: call void @llvm.dbg.declare(metadata %V9letclause6Symbol undef, metadata ![[S:.*]], metadata !{{[0-9]+}})
|
|
// CHECK: ![[S]] = !DILocalVariable(tag: DW_TAG_auto_variable, name: "s"
|
|
// CHECK-SAME: line: [[@LINE+1]],
|
|
while let s = peek() {
|
|
print(s)
|
|
}
|
|
}
|