@@ -554,7 +554,8 @@ bool BridgedProperty::matchMethodCall(SILBasicBlock::iterator It) {
554
554
if (!ObjCMethod || !ObjCMethod->hasOneUse () ||
555
555
ObjCMethod->getOperand () != Instance ||
556
556
ObjCMethod->getFunction ()->getLoweredFunctionType ()->isPolymorphic () ||
557
- ObjCMethod->getType ().castTo <SILFunctionType>()->isPolymorphic ())
557
+ ObjCMethod->getType ().castTo <SILFunctionType>()->isPolymorphic () ||
558
+ ObjCMethod->getType ().castTo <SILFunctionType>()->hasOpenedExistential ())
558
559
return false ;
559
560
560
561
// Don't outline in the outlined function.
@@ -608,7 +609,8 @@ bool BridgedProperty::matchInstSequence(SILBasicBlock::iterator It) {
608
609
// Try to match without the load/strong_retain prefix.
609
610
auto *CMI = dyn_cast<ObjCMethodInst>(It);
610
611
if (!CMI || CMI->getFunction ()->getLoweredFunctionType ()->isPolymorphic () ||
611
- CMI->getType ().castTo <SILFunctionType>()->isPolymorphic ())
612
+ CMI->getType ().castTo <SILFunctionType>()->isPolymorphic () ||
613
+ CMI->getType ().castTo <SILFunctionType>()->hasOpenedExistential ())
612
614
return false ;
613
615
FirstInst = CMI;
614
616
} else
@@ -1039,7 +1041,8 @@ bool ObjCMethodCall::matchInstSequence(SILBasicBlock::iterator I) {
1039
1041
ObjCMethod = dyn_cast<ObjCMethodInst>(I);
1040
1042
if (!ObjCMethod ||
1041
1043
ObjCMethod->getFunction ()->getLoweredFunctionType ()->isPolymorphic () ||
1042
- ObjCMethod->getType ().castTo <SILFunctionType>()->isPolymorphic ())
1044
+ ObjCMethod->getType ().castTo <SILFunctionType>()->isPolymorphic () ||
1045
+ ObjCMethod->getType ().castTo <SILFunctionType>()->hasOpenedExistential ())
1043
1046
return false ;
1044
1047
1045
1048
auto *Use = ObjCMethod->getSingleUse ();
0 commit comments