Expand the pass to unify all of the unwind blocks as well
[oota-llvm.git] / include / llvm / Support / CFG.h
index 48918e0609976b61d2426e86c96aad5fda996159..aab0db9712b9f1aeefca7dd80dd148a64dd8e18c 100644 (file)
@@ -27,8 +27,7 @@ public:
   typedef typename super::pointer pointer;
   
   inline void advancePastConstants() {
-    // TODO: This is bad
-    // Loop to ignore constant pool references
+    // Loop to ignore non terminator uses (for example PHI nodes)...
     while (It != BB->use_end() && !isa<TerminatorInst>(*It))
       ++It;
   }
@@ -43,7 +42,7 @@ public:
   
   inline pointer operator*() const { 
     assert(It != BB->use_end() && "pred_iterator out of range!");
-    return cast<Instruction>(*It)->getParent(); 
+    return cast<TerminatorInst>(*It)->getParent(); 
   }
   inline pointer *operator->() const { return &(operator*()); }