@@ -254,6 +254,7 @@ class BorrowingOperandKind {
254254 enum Kind : uint8_t {
255255 Invalid = 0 ,
256256 BeginBorrow,
257+ StoreBorrow,
257258 BeginApply,
258259 Branch,
259260 Apply,
@@ -277,6 +278,8 @@ class BorrowingOperandKind {
277278 return Kind::Invalid;
278279 case SILInstructionKind::BeginBorrowInst:
279280 return Kind::BeginBorrow;
281+ case SILInstructionKind::StoreBorrowInst:
282+ return Kind::StoreBorrow;
280283 case SILInstructionKind::BeginApplyInst:
281284 return Kind::BeginApply;
282285 case SILInstructionKind::BranchInst:
@@ -386,6 +389,7 @@ struct BorrowingOperand {
386389 case BorrowingOperandKind::Invalid:
387390 llvm_unreachable (" Using invalid case?!" );
388391 case BorrowingOperandKind::BeginBorrow:
392+ case BorrowingOperandKind::StoreBorrow:
389393 case BorrowingOperandKind::BeginApply:
390394 case BorrowingOperandKind::Apply:
391395 case BorrowingOperandKind::TryApply:
@@ -418,6 +422,7 @@ struct BorrowingOperand {
418422 case BorrowingOperandKind::BeginBorrow:
419423 case BorrowingOperandKind::Branch:
420424 return true ;
425+ case BorrowingOperandKind::StoreBorrow:
421426 case BorrowingOperandKind::BeginApply:
422427 case BorrowingOperandKind::Apply:
423428 case BorrowingOperandKind::TryApply:
@@ -790,7 +795,6 @@ class InteriorPointerOperandKind {
790795 RefTailAddr,
791796 OpenExistentialBox,
792797 ProjectBox,
793- StoreBorrow,
794798 };
795799
796800private:
@@ -819,8 +823,6 @@ class InteriorPointerOperandKind {
819823 return Kind::OpenExistentialBox;
820824 case SILInstructionKind::ProjectBoxInst:
821825 return Kind::ProjectBox;
822- case SILInstructionKind::StoreBorrowInst:
823- return Kind::StoreBorrow;
824826 }
825827 }
826828
@@ -839,8 +841,6 @@ class InteriorPointerOperandKind {
839841 return Kind::OpenExistentialBox;
840842 case ValueKind::ProjectBoxInst:
841843 return Kind::ProjectBox;
842- case ValueKind::StoreBorrowInst:
843- return Kind::StoreBorrow;
844844 }
845845 }
846846
@@ -897,8 +897,7 @@ struct InteriorPointerOperand {
897897 case InteriorPointerOperandKind::RefElementAddr:
898898 case InteriorPointerOperandKind::RefTailAddr:
899899 case InteriorPointerOperandKind::OpenExistentialBox:
900- case InteriorPointerOperandKind::ProjectBox:
901- case InteriorPointerOperandKind::StoreBorrow: {
900+ case InteriorPointerOperandKind::ProjectBox: {
902901 // Ok, we have a valid instruction. Return the relevant operand.
903902 auto *op =
904903 &cast<SingleValueInstruction>(resultValue)->getAllOperands ()[0 ];
@@ -941,8 +940,6 @@ struct InteriorPointerOperand {
941940 return cast<OpenExistentialBoxInst>(operand->getUser ());
942941 case InteriorPointerOperandKind::ProjectBox:
943942 return cast<ProjectBoxInst>(operand->getUser ());
944- case InteriorPointerOperandKind::StoreBorrow:
945- return cast<StoreBorrowInst>(operand->getUser ());
946943 }
947944 llvm_unreachable (" Covered switch isn't covered?!" );
948945 }
0 commit comments