* 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

llvm-svn: 1750
diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
index 59442ea..692fcac 100644
--- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -13,6 +13,7 @@
 #include "llvm/Type.h"
 #include "llvm/BasicBlock.h"
 #include "llvm/ConstantVals.h"
+#include "llvm/Support/CFG.h"
 #include "Support/STLExtras.h"
 
 #if 0
@@ -87,8 +88,8 @@
 
     // Figure out which block is incoming and which is the backedge for the loop
     BasicBlock *Incoming, *BackEdgeBlock;
-    BasicBlock::pred_iterator PI = Header->pred_begin();
-    assert(PI != Header->pred_end() && "Loop headers should have 2 preds!");
+    pred_iterator PI = pred_begin(Header);
+    assert(PI != pred_end(Header) && "Loop headers should have 2 preds!");
     if (Loop->contains(*PI)) {  // First pred is back edge...
       BackEdgeBlock = *PI++;
       Incoming      = *PI++;
@@ -96,7 +97,7 @@
       Incoming      = *PI++;
       BackEdgeBlock = *PI++;
     }
-    assert(PI == Header->pred_end() && "Loop headers should have 2 preds!");
+    assert(PI == pred_end(Header) && "Loop headers should have 2 preds!");
     
     // Add incoming values for the PHI node...
     PN->addIncoming(Constant::getNullConstant(Type::UIntTy), Incoming);