1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Reverse r47989. Part of removing 'unwinds to' support.

llvm-svn: 50087
This commit is contained in:
Nick Lewycky 2008-04-22 05:16:51 +00:00
parent 1b583954ad
commit e708ae5ffd

View File

@ -53,16 +53,13 @@ public:
inline pointer operator*() const {
assert(!It.atEnd() && "pred_iterator out of range!");
if (isa<TerminatorInst>(*It)) // not dyn_cast due to const-correctness
return cast<TerminatorInst>(*It)->getParent();
return cast<_Ptr>(*It);
return cast<TerminatorInst>(*It)->getParent();
}
inline pointer *operator->() const { return &(operator*()); }
inline _Self& operator++() { // Preincrement
assert(!It.atEnd() && "pred_iterator out of range!");
++It; advancePastNonPreds();
++It; advancePastNonTerminators();
return *this;
}
@ -106,8 +103,6 @@ public:
inline SuccIterator(Term_ T, bool) // end iterator
: Term(T), idx(Term->getNumSuccessors()) {
assert(T && "getTerminator returned null!");
if (Term->getParent()->getUnwindDest())
++idx;
}
inline const _Self &operator=(const _Self &I) {
@ -123,12 +118,7 @@ public:
inline bool operator==(const _Self& x) const { return idx == x.idx; }
inline bool operator!=(const _Self& x) const { return !operator==(x); }
inline pointer operator*() const {
if (idx == Term->getNumSuccessors())
return Term->getParent()->getUnwindDest();
return Term->getSuccessor(idx);
}
inline pointer operator*() const { return Term->getSuccessor(idx); }
inline pointer operator->() const { return operator*(); }
inline _Self& operator++() { ++idx; return *this; } // Preincrement