Removed unused parameters.
[oota-llvm.git] / include / llvm / Instruction.h
index 29ae5c3cfbf5aa853482a1388e35ff5707b3ff0b..ac33a68bbfec23de35267b540947b939bc7033c1 100644 (file)
 #define LLVM_INSTRUCTION_H
 
 #include "llvm/User.h"
+#include "llvm/ADT/ilist_node.h"
 
 namespace llvm {
 
 struct AssemblyAnnotationWriter;
-class BinaryOperator;
 
 template<typename ValueSubClass, typename ItemParentClass>
   class SymbolTableListTraits;
 
-class Instruction : public User {
+class Instruction : public User, public ilist_node<Instruction> {
   void operator=(const Instruction &);     // Do not implement
   Instruction(const Instruction &);        // Do not implement
 
   BasicBlock *Parent;
-  Instruction *Prev, *Next; // Next and Prev links for our intrusive linked list
-
-  void setNext(Instruction *N) { Next = N; }
-  void setPrev(Instruction *N) { Prev = N; }
 
   friend class SymbolTableListTraits<Instruction, BasicBlock>;
   void setParent(BasicBlock *P);
@@ -103,6 +99,10 @@ public:
   ///
   void eraseFromParent();
 
+  /// insertBefore - Insert an unlinked instructions into a basic block
+  /// immediately before the specified instruction.
+  void insertBefore(Instruction *InsertPos);
+
   /// moveBefore - Unlink this instruction from its current basic block and
   /// insert it into the basic block that MovePos lives in, right before
   /// MovePos.
@@ -227,14 +227,6 @@ public:
 #define   LAST_OTHER_INST(N)             OtherOpsEnd = N+1
 #include "llvm/Instruction.def"
   };
-  
-private:
-  // getNext/Prev - Return the next or previous instruction in the list.  The
-  // last node in the list is a terminator instruction.
-  Instruction *getNext()             { return Next; }
-  const Instruction *getNext() const { return Next; }
-  Instruction *getPrev()             { return Prev; }
-  const Instruction *getPrev() const { return Prev; }
 };
 
 } // End llvm namespace