AllocationInst(const Type *Ty, Value *ArraySize, unsigned iTy, unsigned Align,
const std::string &Name, BasicBlock *InsertAtEnd);
public:
+ // Out of line virtual method, so the vtable, etc has a home.
+ virtual ~AllocationInst();
+
/// isArrayAllocation - Return true if there is an allocation size parameter
/// to the allocation instruction that is not 1.
///
///
class FreeInst : public UnaryInstruction {
void AssertOK();
-protected:
- static void destroyThis(FreeInst* v) {
- UnaryInstruction::destroyThis(v);
- }
- friend class Value;
public:
explicit FreeInst(Value *Ptr, Instruction *InsertBefore = 0);
FreeInst(Value *Ptr, BasicBlock *InsertAfter);
#endif
}
void AssertOK();
-protected:
- static void destroyThis(LoadInst* v) {
- UnaryInstruction::destroyThis(v);
- }
- friend class Value;
public:
LoadInst(Value *Ptr, const std::string &Name, Instruction *InsertBefore);
LoadInst(Value *Ptr, const std::string &Name, BasicBlock *InsertAtEnd);
#endif
}
void AssertOK();
-protected:
- static void destroyThis(StoreInst* v) {
- Instruction::destroyThis(v);
- }
- friend class Value;
public:
StoreInst(Value *Val, Value *Ptr, Instruction *InsertBefore);
StoreInst(Value *Val, Value *Ptr, BasicBlock *InsertAtEnd);
}
}
-protected:
- static void destroyThis(GetElementPtrInst*v);
- friend class Value;
public:
/// Constructors - Create a getelementptr instruction with a base pointer an
/// list of indices. The first ctor can optionally insert before an existing
const std::string &Name = "", Instruction *InsertBefore =0);
GetElementPtrInst(Value *Ptr, Value *Idx,
const std::string &Name, BasicBlock *InsertAtEnd);
+ ~GetElementPtrInst();
virtual GetElementPtrInst *clone() const;
/// vectors of integrals. The two operands must be the same type.
/// @brief Represent an integer comparison operator.
class ICmpInst: public CmpInst {
-protected:
- static void destroyThis(ICmpInst* v) {
- CmpInst::destroyThis(v);
- }
- friend class Value;
public:
/// This enumeration lists the possible predicates for the ICmpInst. The
/// values in the range 0-31 are reserved for FCmpInst while values in the
/// vectors of floating point values. The operands must be identical types.
/// @brief Represents a floating point comparison operator.
class FCmpInst: public CmpInst {
-protected:
- static void destroyThis(FCmpInst* v) {
- CmpInst::destroyThis(v);
- }
- friend class Value;
public:
/// This enumeration lists the possible predicates for the FCmpInst. Values
/// in the range 0-31 are reserved for FCmpInst.
setName(Name);
}
-protected:
- static void destroyThis(CallInst*v);
- friend class Value;
public:
/// Construct a CallInst given a range of arguments. InputIterator
/// must be a random-access iterator pointing to contiguous storage
explicit CallInst(Value *F, const std::string &Name = "",
Instruction *InsertBefore = 0);
CallInst(Value *F, const std::string &Name, BasicBlock *InsertAtEnd);
+ ~CallInst();
virtual CallInst *clone() const;
: Instruction(SI.getType(), SI.getOpcode(), Ops, 3) {
init(SI.Ops[0], SI.Ops[1], SI.Ops[2]);
}
-protected:
- static void destroyThis(SelectInst* v) {
- Instruction::destroyThis(v);
- }
- friend class Value;
public:
SelectInst(Value *C, Value *S1, Value *S2, const std::string &Name = "",
Instruction *InsertBefore = 0)
class VAArgInst : public UnaryInstruction {
VAArgInst(const VAArgInst &VAA)
: UnaryInstruction(VAA.getType(), VAArg, VAA.getOperand(0)) {}
-protected:
- static void destroyThis(VAArgInst* v) {
- UnaryInstruction::destroyThis(v);
- }
- friend class Value;
public:
VAArgInst(Value *List, const Type *Ty, const std::string &Name = "",
Instruction *InsertBefore = 0)
Ops[1].init(EE.Ops[1], this);
}
-protected:
- static void destroyThis(ExtractElementInst* v) {
- Instruction::destroyThis(v);
- }
- friend class Value;
public:
ExtractElementInst(Value *Vec, Value *Idx, const std::string &Name = "",
Instruction *InsertBefore = 0);
class InsertElementInst : public Instruction {
Use Ops[3];
InsertElementInst(const InsertElementInst &IE);
-protected:
- static void destroyThis(InsertElementInst* v) {
- Instruction::destroyThis(v);
- }
- friend class Value;
public:
InsertElementInst(Value *Vec, Value *NewElt, Value *Idx,
const std::string &Name = "",Instruction *InsertBefore = 0);
class ShuffleVectorInst : public Instruction {
Use Ops[3];
ShuffleVectorInst(const ShuffleVectorInst &IE);
-protected:
- static void destroyThis(ShuffleVectorInst* v) {
- Instruction::destroyThis(v);
- }
- friend class Value;
public:
ShuffleVectorInst(Value *V1, Value *V2, Value *Mask,
const std::string &Name = "", Instruction *InsertBefor = 0);
/// the number actually in use.
unsigned ReservedSpace;
PHINode(const PHINode &PN);
-protected:
- static void destroyThis(PHINode*);
- friend class Value;
public:
explicit PHINode(const Type *Ty, const std::string &Name = "",
Instruction *InsertBefore = 0)
setName(Name);
}
+ ~PHINode();
+
/// reserveOperandSpace - This method can be used to avoid repeated
/// reallocation of PHI operand lists by reserving space for the correct
/// number of operands before adding them. Unlike normal vector reserves,
SwitchInst(const SwitchInst &RI);
void init(Value *Value, BasicBlock *Default, unsigned NumCases);
void resizeOperands(unsigned No);
-protected:
- static void destroyThis(SwitchInst*v);
- friend class Value;
public:
/// SwitchInst ctor - Create a new switch instruction, specifying a value to
/// switch on and a default destination. The number of additional cases can
/// constructor also autoinserts at the end of the specified BasicBlock.
SwitchInst(Value *Value, BasicBlock *Default, unsigned NumCases,
BasicBlock *InsertAtEnd);
+ ~SwitchInst();
// Accessor Methods for Switch stmt
setName(Name);
}
-protected:
- static void destroyThis(InvokeInst*v);
- friend class Value;
public:
/// Construct an InvokeInst given a range of arguments.
/// InputIterator must be a random-access iterator pointing to
typename std::iterator_traits<InputIterator>::iterator_category());
}
+ ~InvokeInst();
+
virtual InvokeInst *clone() const;
/// getCallingConv/setCallingConv - Get or set the calling convention of this
TruncInst(const TruncInst &CI)
: CastInst(CI.getType(), Trunc, CI.getOperand(0)) {
}
-protected:
- static void destroyThis(TruncInst* v) {
- CastInst::destroyThis(v);
- }
- friend class Value;
public:
/// @brief Constructor with insert-before-instruction semantics
TruncInst(
ZExtInst(const ZExtInst &CI)
: CastInst(CI.getType(), ZExt, CI.getOperand(0)) {
}
-protected:
- static void destroyThis(ZExtInst* v) {
- CastInst::destroyThis(v);
- }
- friend class Value;
public:
/// @brief Constructor with insert-before-instruction semantics
ZExtInst(
SExtInst(const SExtInst &CI)
: CastInst(CI.getType(), SExt, CI.getOperand(0)) {
}
-protected:
- static void destroyThis(SExtInst* v) {
- CastInst::destroyThis(v);
- }
- friend class Value;
public:
/// @brief Constructor with insert-before-instruction semantics
SExtInst(
FPTruncInst(const FPTruncInst &CI)
: CastInst(CI.getType(), FPTrunc, CI.getOperand(0)) {
}
-protected:
- static void destroyThis(FPTruncInst* v) {
- CastInst::destroyThis(v);
- }
- friend class Value;
public:
/// @brief Constructor with insert-before-instruction semantics
FPTruncInst(
FPExtInst(const FPExtInst &CI)
: CastInst(CI.getType(), FPExt, CI.getOperand(0)) {
}
-protected:
- static void destroyThis(FPExtInst* v) {
- CastInst::destroyThis(v);
- }
- friend class Value;
public:
/// @brief Constructor with insert-before-instruction semantics
FPExtInst(
UIToFPInst(const UIToFPInst &CI)
: CastInst(CI.getType(), UIToFP, CI.getOperand(0)) {
}
-protected:
- static void destroyThis(UIToFPInst* v) {
- CastInst::destroyThis(v);
- }
- friend class Value;
public:
/// @brief Constructor with insert-before-instruction semantics
UIToFPInst(
SIToFPInst(const SIToFPInst &CI)
: CastInst(CI.getType(), SIToFP, CI.getOperand(0)) {
}
-protected:
- static void destroyThis(SIToFPInst* v) {
- CastInst::destroyThis(v);
- }
- friend class Value;
public:
/// @brief Constructor with insert-before-instruction semantics
SIToFPInst(
FPToUIInst(const FPToUIInst &CI)
: CastInst(CI.getType(), FPToUI, CI.getOperand(0)) {
}
-protected:
- static void destroyThis(FPToUIInst* v) {
- CastInst::destroyThis(v);
- }
- friend class Value;
public:
/// @brief Constructor with insert-before-instruction semantics
FPToUIInst(
FPToSIInst(const FPToSIInst &CI)
: CastInst(CI.getType(), FPToSI, CI.getOperand(0)) {
}
-protected:
- static void destroyThis(FPToSIInst* v) {
- CastInst::destroyThis(v);
- }
- friend class Value;
public:
/// @brief Constructor with insert-before-instruction semantics
FPToSIInst(
IntToPtrInst(const IntToPtrInst &CI)
: CastInst(CI.getType(), IntToPtr, CI.getOperand(0)) {
}
-protected:
- static void destroyThis(IntToPtrInst* v) {
- CastInst::destroyThis(v);
- }
- friend class Value;
public:
/// @brief Constructor with insert-before-instruction semantics
IntToPtrInst(
PtrToIntInst(const PtrToIntInst &CI)
: CastInst(CI.getType(), PtrToInt, CI.getOperand(0)) {
}
-protected:
- static void destroyThis(PtrToIntInst* v) {
- CastInst::destroyThis(v);
- }
- friend class Value;
public:
/// @brief Constructor with insert-before-instruction semantics
PtrToIntInst(
BitCastInst(const BitCastInst &CI)
: CastInst(CI.getType(), BitCast, CI.getOperand(0)) {
}
-protected:
- static void destroyThis(BitCastInst* v) {
- CastInst::destroyThis(v);
- }
- friend class Value;
public:
/// @brief Constructor with insert-before-instruction semantics
BitCastInst(