Remove dtor's that simply call dropAllReferences

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2001-07-07 18:42:52 +00:00
parent c8b25d40cb
commit f229ed5248
4 changed files with 6 additions and 23 deletions

View 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;

View 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]);

View 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"; }

View 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();