Files
swift-mirror/test/DebugInfo/DynamicSelfLocation.swift
Felipe de Azevedo Piovezan 665ada403e [DebugInfo] Simplify test for DynamicSelfLocation
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.
2024-02-29 14:27:38 -08:00

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: {{$}}