File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -570,9 +570,11 @@ OperandOwnershipKindClassifier::visitFullApply(FullApplySite apply) {
570570 return Map::allLive ();
571571 }
572572
573- // If we have a type dependent operand, return an empty map.
574- if (apply.getInstruction ()->isTypeDependentOperand (op))
575- return Map ();
573+ // We should have early exited if we saw a type dependent operand, so we
574+ // should never hit this.
575+ //
576+ // Lets just assert to be careful though.
577+ assert (!apply.getInstruction ()->isTypeDependentOperand (op));
576578
577579 unsigned argIndex = apply.getCalleeArgIndex (op);
578580 auto conv = apply.getSubstCalleeConv ();
@@ -972,6 +974,8 @@ OperandOwnershipKindClassifier::visitBuiltinInst(BuiltinInst *bi) {
972974// ===----------------------------------------------------------------------===//
973975
974976OperandOwnershipKindMap Operand::getOwnershipKindMap () const {
977+ if (isTypeDependent ())
978+ return OperandOwnershipKindMap ();
975979 OperandOwnershipKindClassifier classifier (getUser ()->getModule (), *this );
976980 return classifier.visit (const_cast <SILInstruction *>(getUser ()));
977981}
You can’t perform that action at this time.
0 commit comments