aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/BasicBlock.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-02-12 22:39:50 +0000
committerChris Lattner <sabre@nondot.org>2002-02-12 22:39:50 +0000
commit455889aa79e3463a4b0f2161e3d9d72a683268b6 (patch)
treeaf1cb8e20b69e33a7a744365fb6e15445abf81ed /lib/VMCore/BasicBlock.cpp
parentcc179d3ab85fd19c3fd9586409c69d14fbb6c642 (diff)
* 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/VMCore/BasicBlock.cpp')
-rw-r--r--lib/VMCore/BasicBlock.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/VMCore/BasicBlock.cpp b/lib/VMCore/BasicBlock.cpp
index df999b84bf..222bb14019 100644
--- a/lib/VMCore/BasicBlock.cpp
+++ b/lib/VMCore/BasicBlock.cpp
@@ -5,11 +5,10 @@
//===----------------------------------------------------------------------===//
#include "llvm/ValueHolderImpl.h"
-#include "llvm/BasicBlock.h"
#include "llvm/iTerminators.h"
-#include "llvm/Method.h"
#include "llvm/SymbolTable.h"
#include "llvm/Type.h"
+#include "llvm/Support/CFG.h"
#include "llvm/iPHINode.h"
#include "llvm/CodeGen/MachineInstr.h"
@@ -90,11 +89,11 @@ bool BasicBlock::hasConstantReferences() const {
// called while the predecessor still refers to this block.
//
void BasicBlock::removePredecessor(BasicBlock *Pred) {
- assert(find(pred_begin(), pred_end(), Pred) != pred_end() &&
+ assert(find(pred_begin(this), pred_end(this), Pred) != pred_end(this) &&
"removePredecessor: BB is not a predecessor!");
if (!isa<PHINode>(front())) return; // Quick exit.
- pred_iterator PI(pred_begin()), EI(pred_end());
+ pred_iterator PI(pred_begin(this)), EI(pred_end(this));
unsigned max_idx;
// Loop over the rest of the predecessors until we run out, or until we find