From f229ed52484d079f0f71db6300c6596852eced66 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 7 Jul 2001 18:42:52 +0000 Subject: [PATCH] Remove dtor's that simply call dropAllReferences git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ConstPoolVals.h | 2 -- include/llvm/InstrTypes.h | 2 -- include/llvm/iOther.h | 2 -- include/llvm/iTerminators.h | 23 ++++++----------------- 4 files changed, 6 insertions(+), 23 deletions(-) diff --git a/include/llvm/ConstPoolVals.h b/include/llvm/ConstPoolVals.h index d21ad8b6da9..47941eb82ee 100644 --- a/include/llvm/ConstPoolVals.h +++ b/include/llvm/ConstPoolVals.h @@ -162,7 +162,6 @@ class ConstPoolArray : public ConstPoolVal { public: ConstPoolArray(const ArrayType *T, vector &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 &V, const string &Name = ""); - inline ~ConstPoolStruct() { dropAllReferences(); } virtual ConstPoolVal *clone() const { return new ConstPoolStruct(*this); } virtual string getStrValue() const; diff --git a/include/llvm/InstrTypes.h b/include/llvm/InstrTypes.h index 8ec0da54d2e..086cc35eccb 100644 --- a/include/llvm/InstrTypes.h +++ b/include/llvm/InstrTypes.h @@ -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]); diff --git a/include/llvm/iOther.h b/include/llvm/iOther.h index 15c52729b33..f6cdcf9c7db 100644 --- a/include/llvm/iOther.h +++ b/include/llvm/iOther.h @@ -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 ¶ms, const string &Name = ""); - inline ~CallInst() { dropAllReferences(); } virtual string getOpcode() const { return "call"; } diff --git a/include/llvm/iTerminators.h b/include/llvm/iTerminators.h index 0d154eab395..9dbaf7bae1f 100644 --- a/include/llvm/iTerminators.h +++ b/include/llvm/iTerminators.h @@ -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::iterator dest_iterator; - //typedef vector::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();