File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -4700,6 +4700,8 @@ void IRGenSILFunction::visitThinToThickFunctionInst(
4700
4700
void IRGenSILFunction::visitThickToObjCMetatypeInst (ThickToObjCMetatypeInst *i){
4701
4701
Explosion from = getLoweredExplosion (i->getOperand ());
4702
4702
llvm::Value *swiftMeta = from.claimNext ();
4703
+ // Claim any conformances.
4704
+ (void )from.claimAll ();
4703
4705
CanType instanceType (i->getType ().castTo <AnyMetatypeType>().getInstanceType ());
4704
4706
Explosion to;
4705
4707
llvm::Value *classPtr =
Original file line number Diff line number Diff line change @@ -75,3 +75,18 @@ bb0(%0 : $AnyObject):
75
75
%1 = existential_metatype $@objc_metatype AnyObject.Type, %0 : $AnyObject
76
76
return %1 : $@objc_metatype AnyObject.Type
77
77
}
78
+
79
+
80
+ public protocol ClassProto : AnyObject {
81
+ var other: ClassProto? { get }
82
+ }
83
+
84
+ // CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc void @drop_witness_table(%swift.type*, i8**)
85
+ // CHECK: call %objc_class* @swift_getObjCClassFromMetadata(%swift.type* %0)
86
+ // CHECK: ret void
87
+ sil @drop_witness_table : $@convention(thin) (@thick ClassProto.Type) -> () {
88
+ bb0(%0 : $@thick ClassProto.Type):
89
+ %1 = thick_to_objc_metatype %0 : $@thick ClassProto.Type to $@objc_metatype ClassProto.Type
90
+ %2 = tuple ()
91
+ return %2 : $()
92
+ }
You can’t perform that action at this time.
0 commit comments