Added member template functions to MallocAllocator and
[oota-llvm.git] / include / llvm / InstrTypes.h
index 5439337224a613bc0a9a7eed8c1d76031e6dd7f3..22ad342d7fbb1e63e9276f586f9ded477fdf5b8d 100644 (file)
@@ -84,12 +84,15 @@ public:
 
 class UnaryInstruction : public Instruction {
   Use Op;
+  
+  // avoiding warning: 'this' : used in base member initializer list
+  UnaryInstruction* this_() { return this; }
 protected:
   UnaryInstruction(const Type *Ty, unsigned iType, Value *V, Instruction *IB =0)
-    : Instruction(Ty, iType, &Op, 1, IB), Op(V, this) {
+    : Instruction(Ty, iType, &Op, 1, IB), Op(V, this_()) {
   }
   UnaryInstruction(const Type *Ty, unsigned iType, Value *V, BasicBlock *IAE)
-    : Instruction(Ty, iType, &Op, 1, IAE), Op(V, this) {
+    : Instruction(Ty, iType, &Op, 1, IAE), Op(V, this_()) {
   }
 public:
   // Out of line virtual method, so the vtable, etc has a home.
@@ -400,7 +403,7 @@ public:
 
   /// A lossless cast is one that does not alter the basic value. It implies
   /// a no-op cast but is more stringent, preventing things like int->float,
-  /// long->double, int->ptr, or packed->anything. 
+  /// long->double, int->ptr, or vector->anything. 
   /// @returns true iff the cast is lossless.
   /// @brief Determine if this is a lossless cast.
   bool isLosslessCast() const;
@@ -494,9 +497,6 @@ public:
                          Value *S2, const std::string &Name, 
                          BasicBlock *InsertAtEnd);
 
-  /// @brief Implement superclass method.
-  virtual CmpInst *clone() const;
-
   /// @brief Get the opcode casted to the right type
   OtherOps getOpcode() const {
     return static_cast<OtherOps>(Instruction::getOpcode());