llvm.org GIT mirror llvm / 59091c4
Reverse r47989. Part of removing 'unwinds to' support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50087 91177308-0d34-0410-b5e6-96231b3b80d8 Nick Lewycky 12 years ago
1 changed file(s) with 3 addition(s) and 13 deletion(s). Raw diff Collapse all Expand all
5252
5353 inline pointer operator*() const {
5454 assert(!It.atEnd() && "pred_iterator out of range!");
55 if (isa(*It)) // not dyn_cast due to const-correctness
56 return cast(*It)->getParent();
57
58 return cast<_Ptr>(*It);
55 return cast<TerminatorInst>(*It)->getParent();
5956 }
6057 inline pointer *operator->() const { return &(operator*()); }
6158
6259 inline _Self& operator++() { // Preincrement
6360 assert(!It.atEnd() && "pred_iterator out of range!");
64 ++It; advancePastNonPreds();
61 ++It; advancePastNonTerminators();
6562 return *this;
6663 }
6764
105102 inline SuccIterator(Term_ T, bool) // end iterator
106103 : Term(T), idx(Term->getNumSuccessors()) {
107104 assert(T && "getTerminator returned null!");
108 if (Term->getParent()->getUnwindDest())
109 ++idx;
110105 }
111106
112107 inline const _Self &operator=(const _Self &I) {
122117 inline bool operator==(const _Self& x) const { return idx == x.idx; }
123118 inline bool operator!=(const _Self& x) const { return !operator==(x); }
124119
125 inline pointer operator*() const {
126 if (idx == Term->getNumSuccessors())
127 return Term->getParent()->getUnwindDest();
128
129 return Term->getSuccessor(idx);
130 }
120 inline pointer operator*() const { return Term->getSuccessor(idx); }
131121 inline pointer operator->() const { return operator*(); }
132122
133123 inline _Self& operator++() { ++idx; return *this; } // Preincrement