diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2008-04-22 05:16:51 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2008-04-22 05:16:51 +0000 |
commit | 59091c46300c8b82e859426d6f58208ebe0d211f (patch) | |
tree | 36fe205156527d77de9024990924fe60a72d94bb /include/llvm/Support/CFG.h | |
parent | dc2421f7861a1f594c9304d0f90db606b562ccbd (diff) | |
download | llvm-59091c46300c8b82e859426d6f58208ebe0d211f.tar.gz llvm-59091c46300c8b82e859426d6f58208ebe0d211f.tar.bz2 llvm-59091c46300c8b82e859426d6f58208ebe0d211f.tar.xz |
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
Diffstat (limited to 'include/llvm/Support/CFG.h')
-rw-r--r-- | include/llvm/Support/CFG.h | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/include/llvm/Support/CFG.h b/include/llvm/Support/CFG.h index f8cbeb0a50..b146a9675c 100644 --- a/include/llvm/Support/CFG.h +++ b/include/llvm/Support/CFG.h @@ -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 |