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
19 lines
709 B
Swift
19 lines
709 B
Swift
// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | FileCheck %s
|
|
|
|
class DeepThought {
|
|
func query() -> Int { return 42 }
|
|
}
|
|
|
|
func foo() -> Int {
|
|
// CHECK: call void @llvm.dbg.declare(metadata %C3let11DeepThought** {{.*}}, metadata ![[A:.*]], metadata !{{[0-9]+}})
|
|
// CHECK ![[A]] = {{.*}}i32 0} ; [ DW_TAG_auto_variable ] [machine] [line [[@LINE+1]]]
|
|
// CHECK: !DILocalVariable(tag: DW_TAG_auto_variable, name: "machine"
|
|
// CHECK-NOT: flags:
|
|
// CHECK-SAME: line: [[@LINE+1]],
|
|
let machine = DeepThought()
|
|
// CHECK: !DILocalVariable(tag: DW_TAG_auto_variable, name: "a"
|
|
// CHECK-SAME: line: [[@LINE+1]],
|
|
let a = machine.query()
|
|
return a
|
|
}
|