forked from swiftlang/swift
- Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDynamicSelfLocation.swift
24 lines (19 loc) · 686 Bytes
/
DynamicSelfLocation.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-irgen -g -o - | %FileCheck %s
// REQUIRES: concurrency
func some_func(_:()->Void)async{}
classModel{
staticfunc SelfFunction(){}
func foo()async->(){
letsomevar=10
returnawaitsome_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: {{$}}