diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2008-04-25 16:53:59 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2008-04-25 16:53:59 +0000 |
commit | 280a6e607d8eb7401749a92db624a82de47da777 (patch) | |
tree | 040d0b406293ebcc56801552313daa6136ee5e6c /include/llvm/Support/CFG.h | |
parent | 419ace9bda6abaaa65560708064b210b4e48880f (diff) | |
download | llvm-280a6e607d8eb7401749a92db624a82de47da777.tar.gz llvm-280a6e607d8eb7401749a92db624a82de47da777.tar.bz2 llvm-280a6e607d8eb7401749a92db624a82de47da777.tar.xz |
Remove 'unwinds to' support from mainline. This patch undoes r47802 r47989
r48047 r48084 r48085 r48086 r48088 r48096 r48099 r48109 and r48123.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50265 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/CFG.h')
-rw-r--r-- | include/llvm/Support/CFG.h | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/include/llvm/Support/CFG.h b/include/llvm/Support/CFG.h index f8cbeb0a50..0d49aecb09 100644 --- a/include/llvm/Support/CFG.h +++ b/include/llvm/Support/CFG.h @@ -34,17 +34,14 @@ public: typedef PredIterator<_Ptr,_USE_iterator> _Self; typedef typename super::pointer pointer; - inline void advancePastNonPreds() { - // Loop to ignore non predecessor uses (for example PHI nodes)... - while (!It.atEnd()) { - if (isa<TerminatorInst>(*It) || isa<BasicBlock>(*It)) - break; + inline void advancePastNonTerminators() { + // Loop to ignore non terminator uses (for example PHI nodes)... + while (!It.atEnd() && !isa<TerminatorInst>(*It)) ++It; - } } inline PredIterator(_Ptr *bb) : It(bb->use_begin()) { - advancePastNonPreds(); + advancePastNonTerminators(); } inline PredIterator(_Ptr *bb, bool) : It(bb->use_end()) {} @@ -53,16 +50,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 +100,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 +115,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 |