File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1192,6 +1192,10 @@ void SILGenFunction::emitArtificialTopLevel(Decl *mainDecl) {
1192
1192
CanType anyObjectMetaTy = CanExistentialMetatypeType::get (anyObjectTy,
1193
1193
MetatypeRepresentation::ObjC);
1194
1194
1195
+ auto conformances =
1196
+ SGM.SwiftModule ->collectExistentialConformances (mainClassMetaty,
1197
+ anyObjectMetaTy);
1198
+
1195
1199
auto paramConvention = ParameterConvention::Direct_Unowned;
1196
1200
auto params = {SILParameterInfo (anyObjectMetaTy, paramConvention)};
1197
1201
std::array<SILResultInfo, 1 > resultInfos = {
@@ -1218,7 +1222,7 @@ void SILGenFunction::emitArtificialTopLevel(Decl *mainDecl) {
1218
1222
SILType::getPrimitiveObjectType (mainClassMetaty));
1219
1223
metaTy = B.createInitExistentialMetatype (mainClass, metaTy,
1220
1224
SILType::getPrimitiveObjectType (anyObjectMetaTy),
1221
- {} );
1225
+ conformances );
1222
1226
SILValue optNameValue = B.createApply (
1223
1227
mainClass, NSStringFromClass, {}, metaTy);
1224
1228
ManagedValue optName = emitManagedRValueWithCleanup (optNameValue);
You can’t perform that action at this time.
0 commit comments