assert(RHS.SI == SI && "Incompatible operators.");
return RHS.Index != Index;
}
+ Self &operator*() {
+ return *this;
+ }
};
typedef CaseIteratorT<const SwitchInst, const ConstantInt, const BasicBlock>
ConstCaseIt case_end() const {
return ConstCaseIt(this, getNumCases());
}
+
+ /// cases - iteration adapter for range-for loops.
+ iterator_range<CaseIt> cases() {
+ return iterator_range<CaseIt>(case_begin(), case_end());
+ }
+
+ /// cases - iteration adapter for range-for loops.
+ iterator_range<ConstCaseIt> cases() const {
+ return iterator_range<ConstCaseIt>(case_begin(), case_end());
+ }
+
/// Returns an iterator that points to the default case.
/// Note: this iterator allows to resolve successor only. Attempt
/// to resolve case value causes an assertion.