diff options
author | Chris Lattner <sabre@nondot.org> | 2002-02-12 22:39:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-02-12 22:39:50 +0000 |
commit | 455889aa79e3463a4b0f2161e3d9d72a683268b6 (patch) | |
tree | af1cb8e20b69e33a7a744365fb6e15445abf81ed /lib/Transforms/IPO/DeadTypeElimination.cpp | |
parent | cc179d3ab85fd19c3fd9586409c69d14fbb6c642 (diff) | |
download | llvm-455889aa79e3463a4b0f2161e3d9d72a683268b6.tar.gz llvm-455889aa79e3463a4b0f2161e3d9d72a683268b6.tar.bz2 llvm-455889aa79e3463a4b0f2161e3d9d72a683268b6.tar.xz |
* Pull BasicBlock::pred_* and BasicBlock::succ_* out of BasicBlock.h and into
llvm/Support/CFG.h
* Make pred & succ iterators for intervals global functions
* Add #includes that are now neccesary because BasicBlock.h doesn't include
InstrTypes.h anymore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1750 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/DeadTypeElimination.cpp')
-rw-r--r-- | lib/Transforms/IPO/DeadTypeElimination.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/DeadTypeElimination.cpp b/lib/Transforms/IPO/DeadTypeElimination.cpp index 297eaddfba..7ec2b6faa8 100644 --- a/lib/Transforms/IPO/DeadTypeElimination.cpp +++ b/lib/Transforms/IPO/DeadTypeElimination.cpp @@ -22,6 +22,7 @@ #include "llvm/iMemory.h" #include "llvm/iTerminators.h" #include "llvm/iOther.h" +#include "llvm/Support/CFG.h" #include <algorithm> #include <iostream> using std::vector; @@ -355,7 +356,7 @@ static inline bool FixCastsAndPHIs(BasicBlock *BB) { // static inline void RefactorPredecessor(BasicBlock *BB, BasicBlock *Pred) { Method *M = BB->getParent(); - assert(find(BB->pred_begin(), BB->pred_end(), Pred) != BB->pred_end() && + assert(find(pred_begin(BB), pred_end(BB), Pred) != pred_end(BB) && "Pred is not a predecessor of BB!"); // Create a new basic block, adding it to the end of the method. @@ -448,7 +449,7 @@ static bool fixLocalProblems(Method *M) { Changed |= FixCastsAndPHIs(BB); if (isa<PHINode>(BB->front())) { - const vector<BasicBlock*> Preds(BB->pred_begin(), BB->pred_end()); + const vector<BasicBlock*> Preds(pred_begin(BB), pred_end(BB)); // Handle Problem #1. Sort the list of predecessors so that it is easy to // decide whether or not duplicate predecessors exist. |