Remove dtor's that simply call dropAllReferences
authorChris Lattner <sabre@nondot.org>
Sat, 7 Jul 2001 18:42:52 +0000 (18:42 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 7 Jul 2001 18:42:52 +0000 (18:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ConstPoolVals.h
include/llvm/InstrTypes.h
include/llvm/iOther.h
include/llvm/iTerminators.h

index d21ad8b6da9a1238a9ce6661aa1e479018c0aa0c..47941eb82ee84451805b431d8c2c8a21de3f0f43 100644 (file)
@@ -162,7 +162,6 @@ class ConstPoolArray : public ConstPoolVal {
 public:
   ConstPoolArray(const ArrayType *T, vector<ConstPoolVal*> &V, 
                 const string &Name = "");
-  inline ~ConstPoolArray() { dropAllReferences(); }
 
   virtual ConstPoolVal *clone() const { return new ConstPoolArray(*this); }
   virtual string getStrValue() const;
@@ -180,7 +179,6 @@ class ConstPoolStruct : public ConstPoolVal {
 public:
   ConstPoolStruct(const StructType *T, vector<ConstPoolVal*> &V, 
                  const string &Name = "");
-  inline ~ConstPoolStruct() { dropAllReferences(); }
 
   virtual ConstPoolVal *clone() const { return new ConstPoolStruct(*this); }
   virtual string getStrValue() const;
index 8ec0da54d2e158f90be8d60fc19b7fee37326994..086cc35eccb4b1c70e595a5f7f54c2807f596009 100644 (file)
@@ -62,7 +62,6 @@ public:
     Operands.reserve(1);
     Operands.push_back(Use(S, this));
   }
-  inline ~UnaryOperator() { dropAllReferences(); }
 
   virtual Instruction *clone() const { 
     return create(getInstType(), Operands[0]);
@@ -95,7 +94,6 @@ public:
     assert(Operands[0] && Operands[1] && 
           Operands[0]->getType() == Operands[1]->getType());
   }
-  inline ~BinaryOperator() { dropAllReferences(); }
 
   virtual Instruction *clone() const {
     return create(getInstType(), Operands[0], Operands[1]);
index 15c52729b339bbca5a667987d50cbc15ef1c2f98..f6cdcf9c7db56578126c21c519c6a6d6c5335d87 100644 (file)
@@ -24,7 +24,6 @@ class PHINode : public Instruction {
   PHINode(const PHINode &PN);
 public:
   PHINode(const Type *Ty, const string &Name = "");
-  inline ~PHINode() { dropAllReferences(); }
 
   virtual Instruction *clone() const { return new PHINode(*this); }
   virtual string getOpcode() const { return "phi"; }
@@ -89,7 +88,6 @@ class CallInst : public Instruction {
   CallInst(const CallInst &CI);
 public:
   CallInst(Method *M, vector<Value*> &params, const string &Name = "");
-  inline ~CallInst() { dropAllReferences(); }
 
   virtual string getOpcode() const { return "call"; }
 
index 0d154eab3957e0a40fa2249675f07cb36bff05e9..9dbaf7bae1f3636f59618e3d77701aa3672a7570 100644 (file)
@@ -38,7 +38,6 @@ public:
       Operands.push_back(Use(RetVal, this));
     }
   }
-  inline ~ReturnInst() { dropAllReferences(); }
 
   virtual Instruction *clone() const { return new ReturnInst(*this); }
 
@@ -68,7 +67,6 @@ class BranchInst : public TerminatorInst {
 public:
   // If cond = null, then is an unconditional br...
   BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse = 0, Value *cond = 0);
-  inline ~BranchInst() { dropAllReferences(); }
 
   virtual Instruction *clone() const { return new BranchInst(*this); }
 
@@ -114,27 +112,18 @@ public:
 // SwitchInst - Multiway switch
 //
 class SwitchInst : public TerminatorInst {
-  // Operand[0] = Value to switch on
-  // Operand[1] = Default basic block destination
+  // Operand[0]    = Value to switch on
+  // Operand[1]    = Default basic block destination
+  // Operand[2n  ] = Value to match
+  // Operand[2n+1] = BasicBlock to go to on match
   SwitchInst(const SwitchInst &RI);
 public:
-  //typedef vector<dest_value>::iterator       dest_iterator;
-  //typedef vector<dest_value>::const_iterator dest_const_iterator;
-
   SwitchInst(Value *Value, BasicBlock *Default);
-  inline ~SwitchInst() { dropAllReferences(); }
 
   virtual Instruction *clone() const { return new SwitchInst(*this); }
 
   // Accessor Methods for Switch stmt
   //
-  /*
-  inline dest_iterator dest_begin() { return Destinations.begin(); }
-  inline dest_iterator dest_end  () { return Destinations.end(); }
-  inline dest_const_iterator dest_begin() const { return Destinations.begin(); }
-  inline dest_const_iterator dest_end  () const { return Destinations.end(); }
-  */
-
   inline const Value *getCondition() const { return Operands[0]; }
   inline       Value *getCondition()       { return Operands[0]; }
   inline const BasicBlock *getDefaultDest() const {
@@ -161,8 +150,8 @@ public:
     return Operands[idx*2+1]->castBasicBlockAsserting();
   }
 
-  // getSuccessorValue - Return the value associated with the specified successor
-  // WARNING: This does not gracefully accept idx's out of range!
+  // getSuccessorValue - Return the value associated with the specified
+  // successor. WARNING: This does not gracefully accept idx's out of range!
   inline const ConstPoolVal *getSuccessorValue(unsigned idx) const {
     assert(idx < getNumSuccessors() && "Successor # out of range!");
     return Operands[idx*2]->castConstantAsserting();