Skip to content

Commit 7ba8b47

Browse files
committed
Fix test for pointer authentication.
Fixes rdar://91669918
1 parent e804492 commit 7ba8b47

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

test/IRGen/existential_shape_metadata.swift

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// RUN: %target-swift-frontend -emit-ir %s -swift-version 5 -disable-availability-checking -enable-parameterized-existential-types | %IRGenFileCheck %s
22

3-
// REQUIRES: rdar91669918
4-
53
// CHECK-LABEL: @"$s1TQyd__Rsz26existential_shape_metadata2Q0Rd__llXGoMq" = linkonce_odr hidden constant
64
// CHECK-SAME: { i32 {{.*}}sub ([[INT]] ptrtoint (i8** @{{[0-9]+}} to [[INT]])
75
// CHECK-SAME: [16 x i8] c"2\C6\0A\EA>\EE/`\DBphz\CB\FA7\8E",
@@ -53,7 +51,7 @@ public func testConcrete() -> Any.Type {
5351
// CHECK: [[T0:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[ARGS]], i32 0, i32 0
5452
// CHECK: store i8* bitcast (%swift.type* @"$sSiN" to i8*), i8** [[T0]], align
5553
// CHECK: [[T0:%.*]] = bitcast [1 x i8*]* [[ARGS]] to i8**
56-
// CHECK: [[CALL:%.*]] = call %swift.type* @swift_getExtendedExistentialTypeMetadata({{.*}}@"$s1TQyd__Rsz26existential_shape_metadata2Q0Rd__llXGoMq" to i8*), i8** [[T0]])
54+
// CHECK: [[CALL:%.*]] = call %swift.type* @swift_getExtendedExistentialTypeMetadata({{.*}}@"$s1TQyd__Rsz26existential_shape_metadata2Q0Rd__llXGoMq{{(\.ptrauth)?}}" to i8*), i8** [[T0]])
5755
// CHECK: store atomic %swift.type* [[CALL]], %swift.type** @"$s26existential_shape_metadata2Q0_pySiXPML" release, align
5856
// CHECK: br label %[[CONT]]
5957
// CHECK: [[CONT]]:
@@ -70,7 +68,7 @@ public func testDependent<T>(t: T.Type) -> Any.Type {
7068
// CHECK: [[T1:%.*]] = bitcast %swift.type* %T to i8*
7169
// CHECK: store i8* [[T1]], i8** [[T0]], align
7270
// CHECK: [[T0:%.*]] = bitcast [1 x i8*]* [[ARGS]] to i8**
73-
// CHECK: [[METADATA:%.*]] = call %swift.type* @swift_getExtendedExistentialTypeMetadata({{.*}}@"$s1TQyd__Rsz26existential_shape_metadata2Q0Rd__llXGoMq" to i8*), i8** [[T0]])
71+
// CHECK: [[METADATA:%.*]] = call %swift.type* @swift_getExtendedExistentialTypeMetadata({{.*}}@"$s1TQyd__Rsz26existential_shape_metadata2Q0Rd__llXGoMq{{(\.ptrauth)?}}" to i8*), i8** [[T0]])
7472
// CHECK: ret %swift.type* [[METADATA]]
7573
return (any Q0<T>).self
7674
}
@@ -85,7 +83,7 @@ public func testComplexApplication<T>(t: T.Type) -> Any.Type {
8583
// CHECK: [[T1:%.*]] = bitcast %swift.type* [[B_T]] to i8*
8684
// CHECK: store i8* [[T1]], i8** [[T0]], align
8785
// CHECK: [[T0:%.*]] = bitcast [1 x i8*]* [[ARGS]] to i8**
88-
// CHECK: [[METADATA:%.*]] = call %swift.type* @swift_getExtendedExistentialTypeMetadata({{.*}}@"$s1TQyd__Rsz26existential_shape_metadata2Q0Rd__llXGoMq" to i8*), i8** [[T0]])
86+
// CHECK: [[METADATA:%.*]] = call %swift.type* @swift_getExtendedExistentialTypeMetadata({{.*}}@"$s1TQyd__Rsz26existential_shape_metadata2Q0Rd__llXGoMq{{(\.ptrauth)?}}" to i8*), i8** [[T0]])
8987
// CHECK: ret %swift.type* [[METADATA]]
9088
return (any Q0<B<T>>).self
9189
}
@@ -99,7 +97,7 @@ public func test_private<T>(t: T.Type) -> Any.Type {
9997
// CHECK: store i8* [[T1]], i8** [[T0]], align
10098
// CHECK: [[T0:%.*]] = bitcast [1 x i8*]* [[ARGS]] to i8**
10199
// FIXME: this should be unique?
102-
// CHECK: [[METADATA:%.*]] = call %swift.type* @swift_getExtendedExistentialTypeMetadata_unique({{.*}}@"$s1TQyd__Rsz26existential_shape_metadata2R033_881A0B6978EB4286E7CFF1E27030ACACLLRd__llXGo" to i8*), i8** [[T0]])
100+
// CHECK: [[METADATA:%.*]] = call %swift.type* @swift_getExtendedExistentialTypeMetadata_unique({{.*}}@"$s1TQyd__Rsz26existential_shape_metadata2R033_881A0B6978EB4286E7CFF1E27030ACACLLRd__llXGo{{(\.ptrauth)?}}" to i8*), i8** [[T0]])
103101
// CHECK: ret %swift.type* [[METADATA]]
104102
return (any R0<T>).self
105103
}
@@ -121,4 +119,4 @@ public func test_privateApplication<T>(t: T.Type) -> Any.Type {
121119
// CHECK: [[T0:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[ARGS]], i32 0, i32 0
122120
// CHECK: store i8* {{.*}}"$s26existential_shape_metadata1C33_881A0B6978EB4286E7CFF1E27030ACACLLVMf"{{.*}}, i8** [[T0]], align
123121
// CHECK: [[T0:%.*]] = bitcast [1 x i8*]* [[ARGS]] to i8**
124-
// CHECK: [[METADATA:%.*]] = call %swift.type* @swift_getExtendedExistentialTypeMetadata({{.*}}@"$s1TQyd__Rsz26existential_shape_metadata2Q0Rd__llXGoMq" to i8*), i8** [[T0]])
122+
// CHECK: [[METADATA:%.*]] = call %swift.type* @swift_getExtendedExistentialTypeMetadata({{.*}}@"$s1TQyd__Rsz26existential_shape_metadata2Q0Rd__llXGoMq{{(\.ptrauth)?}}" to i8*), i8** [[T0]])

0 commit comments

Comments
 (0)