diff options
author | Scott Michel <scottm@aero.org> | 2008-04-16 23:46:39 +0000 |
---|---|---|
committer | Scott Michel <scottm@aero.org> | 2008-04-16 23:46:39 +0000 |
commit | 4bf393a13e779d7a8eac3647df1781068a6dc732 (patch) | |
tree | 40afeb8833d9a8b5ef88c820c5f4e6848d8e918d /include/llvm/Support/CFG.h | |
parent | 03eb38848c9f880f8d97508b6a008f81cc4bdcb9 (diff) | |
download | llvm-4bf393a13e779d7a8eac3647df1781068a6dc732.tar.gz llvm-4bf393a13e779d7a8eac3647df1781068a6dc732.tar.bz2 llvm-4bf393a13e779d7a8eac3647df1781068a6dc732.tar.xz |
Workaround for PR2207, in which pred_iterator assert gets triggered due to a
wee problem in Xcode 2.[45]/gcc 4.0.1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49831 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/CFG.h')
-rw-r--r-- | include/llvm/Support/CFG.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/Support/CFG.h b/include/llvm/Support/CFG.h index 937472d581..f8cbeb0a50 100644 --- a/include/llvm/Support/CFG.h +++ b/include/llvm/Support/CFG.h @@ -36,8 +36,11 @@ public: inline void advancePastNonPreds() { // Loop to ignore non predecessor uses (for example PHI nodes)... - while (!It.atEnd() && !isa<TerminatorInst>(*It) && !isa<BasicBlock>(*It)) + while (!It.atEnd()) { + if (isa<TerminatorInst>(*It) || isa<BasicBlock>(*It)) + break; ++It; + } } inline PredIterator(_Ptr *bb) : It(bb->use_begin()) { |