[llvm-commits] CVS: llvm/include/llvm/Support/CFG.h

Chris Lattner lattner at cs.uiuc.edu
Fri Apr 25 18:40:01 PDT 2003


Changes in directory llvm/include/llvm/Support:

CFG.h updated: 1.8 -> 1.9

---
Log message:

Remove long-dead obsolete cruft


---
Diffs of the changes:

Index: llvm/include/llvm/Support/CFG.h
diff -u llvm/include/llvm/Support/CFG.h:1.8 llvm/include/llvm/Support/CFG.h:1.9
--- llvm/include/llvm/Support/CFG.h:1.8	Thu Oct 10 17:31:31 2002
+++ llvm/include/llvm/Support/CFG.h	Fri Apr 25 18:39:08 2003
@@ -26,15 +26,7 @@
   typedef PredIterator<_Ptr,_USE_iterator> _Self;
   typedef typename super::pointer pointer;
   
-  inline void advancePastConstants() {
-    // TODO: This is bad
-    // Loop to ignore constant pool references
-    while (It != BB->use_end() && !isa<TerminatorInst>(*It))
-      ++It;
-  }
-  
   inline PredIterator(_Ptr *bb) : BB(bb), It(bb->use_begin()) {
-    advancePastConstants();
   }
   inline PredIterator(_Ptr *bb, bool) : BB(bb), It(bb->use_end()) {}
     
@@ -43,13 +35,13 @@
   
   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*()); }
   
   inline _Self& operator++() {   // Preincrement
     assert(It != BB->use_end() && "pred_iterator out of range!");
-    ++It; advancePastConstants();
+    ++It;
     return *this; 
   }
   





More information about the llvm-commits mailing list