Skip to content

Commit d8f46dd

Browse files
committed
Fix a ptrauth test that I broke in swiftlang#34213.
Still not sure how the test run didn't catch this. rdar://70104537
1 parent a373e85 commit d8f46dd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/IRGen/ptrauth-protocols.sil

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ bb0:
7171
// CHECK-LABEL: define swiftcc void @test_accesses(%swift.type* %T, i8** %T.Q)
7272
// Fetch T.Assoc.
7373
// CHECK: %T.Assoc = extractvalue %swift.metadata_response [[TMP:%.*]], 0
74+
// CHECK-NEXT: {{%.*}} = extractvalue %swift.metadata_response [[TMP]], 1
7475
// Fetch T.Assoc : P.
7576
// CHECK-NEXT: %T.Assoc.P = call swiftcc i8** @swift_getAssociatedConformanceWitness(i8** %T.Q, %swift.type* %T, %swift.type* %T.Assoc
7677
// Fetch T.Assoc.foo
@@ -79,7 +80,10 @@ bb0:
7980
// CHECK-NEXT: [[FOO:%.*]] = bitcast i8* [[T1]] to void (%swift.type*, %swift.type*, i8**)*
8081
// CHECK-NEXT: [[T1:%.*]] = ptrtoint i8** [[T0]] to i64
8182
// CHECK-NEXT: [[DISC:%.*]] = call i64 @llvm.ptrauth.blend.i64(i64 [[T1]], i64 53700)
82-
// CHECK-NEXT: call swiftcc void [[FOO]](%swift.type* swiftself %T.Assoc, %swift.type* %T.Assoc, i8** %T.Assoc.P) [ "ptrauth"(i32 0, i64 [[DISC]]) ]
83+
// TODO: be smart about this and do a complete-metadata fetch in the first place
84+
// CHECK-NEXT: [[ASSOC_RESPONSE:%.*]] = call swiftcc %swift.metadata_response @swift_checkMetadataState(i64 0, %swift.type* %T.Assoc)
85+
// CHECK-NEXT: [[ASSOC:%.*]] = extractvalue %swift.metadata_response [[ASSOC_RESPONSE]], 0
86+
// CHECK-NEXT: call swiftcc void [[FOO]](%swift.type* swiftself [[ASSOC]], %swift.type* [[ASSOC]], i8** %T.Assoc.P) [ "ptrauth"(i32 0, i64 [[DISC]]) ]
8387
// CHECK-NEXT: ret void
8488

8589
sil @use_conformances : $@convention(thin) () -> () {

0 commit comments

Comments
 (0)