@@ -142,6 +142,8 @@ bool BottomUpRefCountState::isRefCountStateModified() const {
142142 case LatticeState::MightBeUsed:
143143 return false ;
144144 }
145+
146+ llvm_unreachable (" Unhandled TermKind in switch." );
145147}
146148
147149// / Returns true if given the current lattice state, do we care if the value
@@ -155,6 +157,8 @@ bool BottomUpRefCountState::valueCanBeDecrementedGivenLatticeState() const {
155157 case LatticeState::Decremented:
156158 return false ;
157159 }
160+
161+ llvm_unreachable (" Unhandled LatticeState in switch." );
158162}
159163
160164// / If advance the state's sequence appropriately for a decrement. If we do
@@ -169,6 +173,8 @@ bool BottomUpRefCountState::handleDecrement() {
169173 case LatticeState::Decremented:
170174 return false ;
171175 }
176+
177+ llvm_unreachable (" Unhandled LatticeState in switch." );
172178}
173179
174180// / Returns true if given the current lattice state, do we care if the value we
@@ -182,6 +188,8 @@ bool BottomUpRefCountState::valueCanBeUsedGivenLatticeState() const {
182188 case LatticeState::MightBeUsed:
183189 return false ;
184190 }
191+
192+ llvm_unreachable (" Unhandled LatticeState in switch." );
185193}
186194
187195// / Given the current lattice state, if we have seen a use, advance the
@@ -202,6 +210,8 @@ bool BottomUpRefCountState::handleUser(
202210 case LatticeState::None:
203211 return false ;
204212 }
213+
214+ llvm_unreachable (" Unhandled LatticeState in switch." );
205215}
206216
207217// / Returns true if given the current lattice state, do we care if the value
@@ -216,6 +226,8 @@ valueCanBeGuaranteedUsedGivenLatticeState() const {
216226 case LatticeState::MightBeUsed:
217227 return true ;
218228 }
229+
230+ llvm_unreachable (" Unhandled LatticeState in switch." );
219231}
220232
221233// / Given the current lattice state, if we have seen a use, advance the
@@ -242,6 +254,8 @@ bool BottomUpRefCountState::handleGuaranteedUser(
242254 case LatticeState::None:
243255 return false ;
244256 }
257+
258+ llvm_unreachable (" Unhandled LatticeState in switch." );
245259}
246260
247261// Returns true if the passed in ref count inst matches the ref count inst
@@ -279,6 +293,8 @@ handleRefCountInstMatch(SILInstruction *RefCountInst) {
279293 case LatticeState::MightBeDecremented:
280294 return true ;
281295 }
296+
297+ llvm_unreachable (" Unhandled LatticeState in switch." );
282298}
283299
284300bool BottomUpRefCountState::merge (const BottomUpRefCountState &Other) {
@@ -577,6 +593,8 @@ bool TopDownRefCountState::isRefCountStateModified() const {
577593 case LatticeState::MightBeUsed:
578594 return false ;
579595 }
596+
597+ llvm_unreachable (" Unhandled LatticeState in switch." );
580598}
581599
582600// / Returns true if given the current lattice state, do we care if the value
@@ -590,6 +608,8 @@ bool TopDownRefCountState::valueCanBeDecrementedGivenLatticeState() const {
590608 case LatticeState::MightBeUsed:
591609 return false ;
592610 }
611+
612+ llvm_unreachable (" Unhandled LatticeState in switch." );
593613}
594614
595615// / If advance the state's sequence appropriately for a decrement. If we do
@@ -606,6 +626,8 @@ bool TopDownRefCountState::handleDecrement(
606626 case LatticeState::MightBeUsed:
607627 return false ;
608628 }
629+
630+ llvm_unreachable (" Unhandled LatticeState in switch." );
609631}
610632
611633// / Returns true if given the current lattice state, do we care if the value
@@ -619,6 +641,8 @@ bool TopDownRefCountState::valueCanBeUsedGivenLatticeState() const {
619641 case LatticeState::MightBeUsed:
620642 return false ;
621643 }
644+
645+ llvm_unreachable (" Unhandled LatticeState in switch." );
622646}
623647
624648// / Given the current lattice state, if we have seen a use, advance the
@@ -639,6 +663,8 @@ bool TopDownRefCountState::handleUser(SILInstruction *PotentialUser,
639663 case LatticeState::MightBeUsed:
640664 return false ;
641665 }
666+
667+ llvm_unreachable (" Unhandled LatticeState in switch." );
642668}
643669
644670// / Returns true if given the current lattice state, do we care if the value
@@ -654,6 +680,8 @@ valueCanBeGuaranteedUsedGivenLatticeState() const {
654680 case LatticeState::MightBeDecremented:
655681 return true ;
656682 }
683+
684+ llvm_unreachable (" Unhandled LatticeState in switch." );
657685}
658686
659687// / Given the current lattice state, if we have seen a use, advance the
@@ -680,6 +708,8 @@ bool TopDownRefCountState::handleGuaranteedUser(
680708 case LatticeState::None:
681709 return false ;
682710 }
711+
712+ llvm_unreachable (" Unhandled LatticeState in switch." );
683713}
684714
685715// Returns true if the passed in ref count inst matches the ref count inst
@@ -713,6 +743,8 @@ handleRefCountInstMatch(SILInstruction *RefCountInst) {
713743 case LatticeState::MightBeUsed:
714744 return true ;
715745 }
746+
747+ llvm_unreachable (" Unhandled LatticeState in switch." );
716748}
717749
718750bool TopDownRefCountState::merge (const TopDownRefCountState &Other) {
@@ -908,6 +940,8 @@ raw_ostream &operator<<(raw_ostream &OS,
908940 case LatticeState::MightBeDecremented:
909941 return OS << " MightBeDecremented" ;
910942 }
943+
944+ llvm_unreachable (" Unhandled LatticeState in switch." );
911945}
912946
913947llvm::raw_ostream &operator <<(llvm::raw_ostream &OS,
@@ -923,6 +957,8 @@ llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
923957 case LatticeState::MightBeDecremented:
924958 return OS << " MightBeDecremented" ;
925959 }
960+
961+ llvm_unreachable (" Unhandled LatticeState in switch." );
926962}
927963
928964} // end namespace llvm
0 commit comments