mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
We only want to check that there is no "!dbg" until the next line, we can accomplish this by checking-same on the end-of-line regex marker.
25 lines
680 B
Swift
25 lines
680 B
Swift
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-irgen -g -o - | %FileCheck %s
|
|
// REQUIRES: concurrency
|
|
|
|
func some_func(_: () -> Void) async {}
|
|
|
|
class Model {
|
|
static func SelfFunction() {}
|
|
|
|
func foo() async -> () {
|
|
let somevar = 10
|
|
|
|
return await some_func {
|
|
Self.SelfFunction()
|
|
}
|
|
}
|
|
}
|
|
|
|
// Check that the load of DynamicSelf in foo does not have any debug information, as
|
|
// this is hoisted to the start of the function.
|
|
// CHECK: define {{.*}} @"$s19DynamicSelfLocation5ModelC3fooyyYaF"({{.*}}, ptr swiftself %[[Self:.*]])
|
|
// CHECK-NEXT: entry:
|
|
// CHECK-NEXT: %2 = load ptr, ptr %[[Self]]
|
|
// CHECK-NOT: !dbg
|
|
// CHECK-SAME: {{$}}
|