Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions test/IRGen/existential_shape_metadata.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// RUN: %target-swift-frontend -emit-ir %s -swift-version 5 -disable-availability-checking -enable-parameterized-existential-types | %IRGenFileCheck %s

// REQUIRES: rdar91669918

// CHECK-LABEL: @"$s1TQyd__Rsz26existential_shape_metadata2Q0Rd__llXGoMq" = linkonce_odr hidden constant
// CHECK-SAME: { i32 {{.*}}sub ([[INT]] ptrtoint (i8** @{{[0-9]+}} to [[INT]])
// CHECK-SAME: [16 x i8] c"2\C6\0A\EA>\EE/`\DBphz\CB\FA7\8E",
Expand Down Expand Up @@ -53,7 +51,7 @@ public func testConcrete() -> Any.Type {
// CHECK: [[T0:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[ARGS]], i32 0, i32 0
// CHECK: store i8* bitcast (%swift.type* @"$sSiN" to i8*), i8** [[T0]], align
// CHECK: [[T0:%.*]] = bitcast [1 x i8*]* [[ARGS]] to i8**
// CHECK: [[CALL:%.*]] = call %swift.type* @swift_getExtendedExistentialTypeMetadata({{.*}}@"$s1TQyd__Rsz26existential_shape_metadata2Q0Rd__llXGoMq" to i8*), i8** [[T0]])
// CHECK: [[CALL:%.*]] = call %swift.type* @swift_getExtendedExistentialTypeMetadata({{.*}}@"$s1TQyd__Rsz26existential_shape_metadata2Q0Rd__llXGoMq{{(\.ptrauth)?}}" to i8*), i8** [[T0]])
// CHECK: store atomic %swift.type* [[CALL]], %swift.type** @"$s26existential_shape_metadata2Q0_pySiXPML" release, align
// CHECK: br label %[[CONT]]
// CHECK: [[CONT]]:
Expand All @@ -70,7 +68,7 @@ public func testDependent<T>(t: T.Type) -> Any.Type {
// CHECK: [[T1:%.*]] = bitcast %swift.type* %T to i8*
// CHECK: store i8* [[T1]], i8** [[T0]], align
// CHECK: [[T0:%.*]] = bitcast [1 x i8*]* [[ARGS]] to i8**
// CHECK: [[METADATA:%.*]] = call %swift.type* @swift_getExtendedExistentialTypeMetadata({{.*}}@"$s1TQyd__Rsz26existential_shape_metadata2Q0Rd__llXGoMq" to i8*), i8** [[T0]])
// CHECK: [[METADATA:%.*]] = call %swift.type* @swift_getExtendedExistentialTypeMetadata({{.*}}@"$s1TQyd__Rsz26existential_shape_metadata2Q0Rd__llXGoMq{{(\.ptrauth)?}}" to i8*), i8** [[T0]])
// CHECK: ret %swift.type* [[METADATA]]
return (any Q0<T>).self
}
Expand All @@ -85,7 +83,7 @@ public func testComplexApplication<T>(t: T.Type) -> Any.Type {
// CHECK: [[T1:%.*]] = bitcast %swift.type* [[B_T]] to i8*
// CHECK: store i8* [[T1]], i8** [[T0]], align
// CHECK: [[T0:%.*]] = bitcast [1 x i8*]* [[ARGS]] to i8**
// CHECK: [[METADATA:%.*]] = call %swift.type* @swift_getExtendedExistentialTypeMetadata({{.*}}@"$s1TQyd__Rsz26existential_shape_metadata2Q0Rd__llXGoMq" to i8*), i8** [[T0]])
// CHECK: [[METADATA:%.*]] = call %swift.type* @swift_getExtendedExistentialTypeMetadata({{.*}}@"$s1TQyd__Rsz26existential_shape_metadata2Q0Rd__llXGoMq{{(\.ptrauth)?}}" to i8*), i8** [[T0]])
// CHECK: ret %swift.type* [[METADATA]]
return (any Q0<B<T>>).self
}
Expand All @@ -99,7 +97,7 @@ public func test_private<T>(t: T.Type) -> Any.Type {
// CHECK: store i8* [[T1]], i8** [[T0]], align
// CHECK: [[T0:%.*]] = bitcast [1 x i8*]* [[ARGS]] to i8**
// FIXME: this should be unique?
// CHECK: [[METADATA:%.*]] = call %swift.type* @swift_getExtendedExistentialTypeMetadata_unique({{.*}}@"$s1TQyd__Rsz26existential_shape_metadata2R033_881A0B6978EB4286E7CFF1E27030ACACLLRd__llXGo" to i8*), i8** [[T0]])
// CHECK: [[METADATA:%.*]] = call %swift.type* @swift_getExtendedExistentialTypeMetadata_unique({{.*}}@"$s1TQyd__Rsz26existential_shape_metadata2R033_881A0B6978EB4286E7CFF1E27030ACACLLRd__llXGo{{(\.ptrauth)?}}" to i8*), i8** [[T0]])
// CHECK: ret %swift.type* [[METADATA]]
return (any R0<T>).self
}
Expand All @@ -121,4 +119,4 @@ public func test_privateApplication<T>(t: T.Type) -> Any.Type {
// CHECK: [[T0:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[ARGS]], i32 0, i32 0
// CHECK: store i8* {{.*}}"$s26existential_shape_metadata1C33_881A0B6978EB4286E7CFF1E27030ACACLLVMf"{{.*}}, i8** [[T0]], align
// CHECK: [[T0:%.*]] = bitcast [1 x i8*]* [[ARGS]] to i8**
// CHECK: [[METADATA:%.*]] = call %swift.type* @swift_getExtendedExistentialTypeMetadata({{.*}}@"$s1TQyd__Rsz26existential_shape_metadata2Q0Rd__llXGoMq" to i8*), i8** [[T0]])
// CHECK: [[METADATA:%.*]] = call %swift.type* @swift_getExtendedExistentialTypeMetadata({{.*}}@"$s1TQyd__Rsz26existential_shape_metadata2Q0Rd__llXGoMq{{(\.ptrauth)?}}" to i8*), i8** [[T0]])