Revert BuildVectorSDNode related patches: 65426, 65427, and 65296.
[oota-llvm.git] / include / llvm / BasicBlock.h
index fd729acd28dd7412ea5e571ebca8bf589f35917f..780aca5ef6df3176d508aafe5f74142aff57d17a 100644 (file)
@@ -22,8 +22,6 @@
 namespace llvm {
 
 class TerminatorInst;
-template <class Term, class BB> class SuccIterator;  // Successor Iterator
-template <class Ptr, class USE_iterator> class PredIterator;
 
 template<> struct ilist_traits<Instruction>
   : public SymbolTableListTraits<Instruction, BasicBlock> {
@@ -136,6 +134,16 @@ public:
     return const_cast<BasicBlock*>(this)->getSinglePredecessor();
   }
 
+  /// getUniquePredecessor - If this basic block has a unique predecessor block,
+  /// return the block, otherwise return a null pointer.
+  /// Note that unique predecessor doesn't mean single edge, there can be 
+  /// multiple edges from the unique predecessor to this block (for example 
+  /// a switch statement with multiple cases having the same destination).
+  BasicBlock *getUniquePredecessor();
+  const BasicBlock *getUniquePredecessor() const {
+    return const_cast<BasicBlock*>(this)->getUniquePredecessor();
+  }
+
   //===--------------------------------------------------------------------===//
   /// Instruction iterator methods
   ///