@@ -12,8 +12,8 @@ import PointerAuth
12
12
// CHECK: end_access [[A1]] : $*Optional<UnsafeMutablePointer<SecureStruct>>
13
13
// CHECK: switch_enum [[LD1]] : $Optional<UnsafeMutablePointer<SecureStruct>>, case #Optional.some!enumelt: bb2, case #Optional.none!enumelt: bb1
14
14
// CHECK: bb2([[BBARG1:%.*]] : $UnsafeMutablePointer<SecureStruct>):
15
- // CHECK: [[F1:%.*]] = function_ref @$sSp7pointeexvlu : $@convention(method) <τ_0_0> (UnsafeMutablePointer<τ_0_0>) -> UnsafePointer<τ_0_0>
16
- // CHECK: [[PTR1:%.*]] = apply [[F1]]<SecureStruct>([[BBARG1]]) : $@convention(method) <τ_0_0> (UnsafeMutablePointer<τ_0_0>) -> UnsafePointer<τ_0_0>
15
+ // CHECK: [[F1:%.*]] = function_ref @$sSpsRi_zrlE7pointeexvlu : $@convention(method) <τ_0_0 where τ_0_0 : ~Copyable > (UnsafeMutablePointer<τ_0_0>) -> UnsafePointer<τ_0_0>
16
+ // CHECK: [[PTR1:%.*]] = apply [[F1]]<SecureStruct>([[BBARG1]]) : $@convention(method) <τ_0_0 where τ_0_0 : ~Copyable > (UnsafeMutablePointer<τ_0_0>) -> UnsafePointer<τ_0_0>
17
17
// CHECK: [[RAW1:%.*]] = struct_extract [[PTR1]] : $UnsafePointer<SecureStruct>, #UnsafePointer._rawValue
18
18
// CHECK: [[ADDR1:%.*]] = pointer_to_address [[RAW1]] : $Builtin.RawPointer to [strict] $*SecureStruct
19
19
// CHECK: [[A2:%.*]] = begin_access [read] [unsafe] [[ADDR1]] : $*SecureStruct
@@ -31,8 +31,8 @@ func test_field_fn_read() -> Int32 {
31
31
32
32
// CHECK-LABEL: sil hidden [ossa] @$s25ptrauth_field_fptr_import05test_B12_fn_ptr_swapyyF :
33
33
// CHECK:bb8([[UMP:%.*]] : $UnsafeMutablePointer<SecureStruct>):
34
- // CHECK: [[F1:%.*]] = function_ref @$sSp7pointeexvau : $@convention(method) <τ_0_0> (UnsafeMutablePointer<τ_0_0>) -> UnsafeMutablePointer<τ_0_0>
35
- // CHECK: [[P:%.*]] = apply [[F1]]<SecureStruct>([[UMP]]) : $@convention(method) <τ_0_0> (UnsafeMutablePointer<τ_0_0>) -> UnsafeMutablePointer<τ_0_0>
34
+ // CHECK: [[F1:%.*]] = function_ref @$sSpsRi_zrlE7pointeexvau : $@convention(method) <τ_0_0 where τ_0_0 : ~Copyable > (UnsafeMutablePointer<τ_0_0>) -> UnsafeMutablePointer<τ_0_0>
35
+ // CHECK: [[P:%.*]] = apply [[F1]]<SecureStruct>([[UMP]]) : $@convention(method) <τ_0_0 where τ_0_0 : ~Copyable > (UnsafeMutablePointer<τ_0_0>) -> UnsafeMutablePointer<τ_0_0>
36
36
// CHECK: [[EX1:%.*]] = struct_extract [[P]] : $UnsafeMutablePointer<SecureStruct>, #UnsafeMutablePointer._rawValue
37
37
// CHECK: [[ADDR:%.*]] = pointer_to_address [[EX1]] : $Builtin.RawPointer to [strict] $*SecureStruct
38
38
// CHECK: [[A1:%.*]] = begin_access [modify] [unsafe] [[ADDR]] : $*SecureStruct
@@ -65,8 +65,8 @@ func test_field_fn_ptr_temp() -> Int32 {
65
65
// CHECK: end_access [[A1]] : $*Optional<UnsafeMutablePointer<AddressDiscriminatedSecureStruct>>
66
66
// CHECK: switch_enum [[LD1]] : $Optional<UnsafeMutablePointer<AddressDiscriminatedSecureStruct>>, case #Optional.some!enumelt: bb2, case #Optional.none!enumelt: bb1
67
67
// CHECK: bb2([[BBARG1:%.*]] : $UnsafeMutablePointer<AddressDiscriminatedSecureStruct>):
68
- // CHECK: [[F1:%.*]] = function_ref @$sSp7pointeexvlu : $@convention(method) <τ_0_0> (UnsafeMutablePointer<τ_0_0>) -> UnsafePointer<τ_0_0>
69
- // CHECK: [[PTR1:%.*]] = apply [[F1]]<AddressDiscriminatedSecureStruct>([[BBARG1]]) : $@convention(method) <τ_0_0> (UnsafeMutablePointer<τ_0_0>) -> UnsafePointer<τ_0_0>
68
+ // CHECK: [[F1:%.*]] = function_ref @$sSpsRi_zrlE7pointeexvlu : $@convention(method) <τ_0_0 where τ_0_0 : ~Copyable > (UnsafeMutablePointer<τ_0_0>) -> UnsafePointer<τ_0_0>
69
+ // CHECK: [[PTR1:%.*]] = apply [[F1]]<AddressDiscriminatedSecureStruct>([[BBARG1]]) : $@convention(method) <τ_0_0 where τ_0_0 : ~Copyable > (UnsafeMutablePointer<τ_0_0>) -> UnsafePointer<τ_0_0>
70
70
// CHECK: [[RAW1:%.*]] = struct_extract [[PTR1]] : $UnsafePointer<AddressDiscriminatedSecureStruct>, #UnsafePointer._rawValue
71
71
// CHECK: [[ADDR1:%.*]] = pointer_to_address [[RAW1]] : $Builtin.RawPointer to [strict] $*AddressDiscriminatedSecureStruct
72
72
// CHECK: [[A2:%.*]] = begin_access [read] [unsafe] [[ADDR1]] : $*AddressDiscriminatedSecureStruct
@@ -84,8 +84,8 @@ func test_addr_discriminated_field_fn_read() -> Int32 {
84
84
85
85
// CHECK-LABEL: sil hidden [ossa] @$s25ptrauth_field_fptr_import024test_addr_discriminated_B12_fn_ptr_swapyyF :
86
86
// CHECK:bb8([[UMP:%.*]] : $UnsafeMutablePointer<AddressDiscriminatedSecureStruct>):
87
- // CHECK: [[F1:%.*]] = function_ref @$sSp7pointeexvau : $@convention(method) <τ_0_0> (UnsafeMutablePointer<τ_0_0>) -> UnsafeMutablePointer<τ_0_0>
88
- // CHECK: [[P:%.*]] = apply [[F1]]<AddressDiscriminatedSecureStruct>([[UMP]]) : $@convention(method) <τ_0_0> (UnsafeMutablePointer<τ_0_0>) -> UnsafeMutablePointer<τ_0_0>
87
+ // CHECK: [[F1:%.*]] = function_ref @$sSpsRi_zrlE7pointeexvau : $@convention(method) <τ_0_0 where τ_0_0 : ~Copyable > (UnsafeMutablePointer<τ_0_0>) -> UnsafeMutablePointer<τ_0_0>
88
+ // CHECK: [[P:%.*]] = apply [[F1]]<AddressDiscriminatedSecureStruct>([[UMP]]) : $@convention(method) <τ_0_0 where τ_0_0 : ~Copyable > (UnsafeMutablePointer<τ_0_0>) -> UnsafeMutablePointer<τ_0_0>
89
89
// CHECK: [[EX1:%.*]] = struct_extract [[P]] : $UnsafeMutablePointer<AddressDiscriminatedSecureStruct>, #UnsafeMutablePointer._rawValue
90
90
// CHECK: [[ADDR:%.*]] = pointer_to_address [[EX1]] : $Builtin.RawPointer to [strict] $*AddressDiscriminatedSecureStruct
91
91
// CHECK: [[A1:%.*]] = begin_access [modify] [unsafe] [[ADDR]] : $*AddressDiscriminatedSecureStruct
@@ -109,8 +109,8 @@ func test_addr_discriminated_field_fn_ptr_swap() {
109
109
// CHECK: end_access [[A1]] : $*Optional<UnsafeMutablePointer<AddressDiscriminatedSecureStruct>>
110
110
// CHECK: switch_enum [[LD1]] : $Optional<UnsafeMutablePointer<AddressDiscriminatedSecureStruct>>, case #Optional.some!enumelt: bb2, case #Optional.none!enumelt: bb1
111
111
// CHECK: bb2([[BBARG1:%.*]] : $UnsafeMutablePointer<AddressDiscriminatedSecureStruct>):
112
- // CHECK: [[F1:%.*]] = function_ref @$sSp7pointeexvlu : $@convention(method) <τ_0_0> (UnsafeMutablePointer<τ_0_0>) -> UnsafePointer<τ_0_0>
113
- // CHECK: [[PTR1:%.*]] = apply [[F1]]<AddressDiscriminatedSecureStruct>([[BBARG1]]) : $@convention(method) <τ_0_0> (UnsafeMutablePointer<τ_0_0>) -> UnsafePointer<τ_0_0>
112
+ // CHECK: [[F1:%.*]] = function_ref @$sSpsRi_zrlE7pointeexvlu : $@convention(method) <τ_0_0 where τ_0_0 : ~Copyable > (UnsafeMutablePointer<τ_0_0>) -> UnsafePointer<τ_0_0>
113
+ // CHECK: [[PTR1:%.*]] = apply [[F1]]<AddressDiscriminatedSecureStruct>([[BBARG1]]) : $@convention(method) <τ_0_0 where τ_0_0 : ~Copyable > (UnsafeMutablePointer<τ_0_0>) -> UnsafePointer<τ_0_0>
114
114
// CHECK: [[RAW1:%.*]] = struct_extract [[PTR1]] : $UnsafePointer<AddressDiscriminatedSecureStruct>, #UnsafePointer._rawValue
115
115
// CHECK: [[ADDR1:%.*]] = pointer_to_address [[RAW1]] : $Builtin.RawPointer to [strict] $*AddressDiscriminatedSecureStruct
116
116
// CHECK: [[A2:%.*]] = begin_access [read] [unsafe] [[ADDR1]] : $*AddressDiscriminatedSecureStruct
0 commit comments