class ConstantInt;
class ConstantRange;
class APInt;
+class LLVMContext;
//===----------------------------------------------------------------------===//
// AllocationInst Class
///
class AllocationInst : public UnaryInstruction {
protected:
- AllocationInst(const Type *Ty, Value *ArraySize, unsigned iTy, unsigned Align,
- const std::string &Name = "", Instruction *InsertBefore = 0);
- AllocationInst(const Type *Ty, Value *ArraySize, unsigned iTy, unsigned Align,
- const std::string &Name, BasicBlock *InsertAtEnd);
+ AllocationInst(const Type *Ty, Value *ArraySize,
+ unsigned iTy, unsigned Align, const std::string &Name = "",
+ Instruction *InsertBefore = 0);
+ 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();
explicit MallocInst(const Type *Ty, Value *ArraySize = 0,
const std::string &NameStr = "",
Instruction *InsertBefore = 0)
- : AllocationInst(Ty, ArraySize, Malloc, 0, NameStr, InsertBefore) {}
- MallocInst(const Type *Ty, Value *ArraySize, const std::string &NameStr,
- BasicBlock *InsertAtEnd)
+ : AllocationInst(Ty, ArraySize, Malloc,
+ 0, NameStr, InsertBefore) {}
+ MallocInst(const Type *Ty, Value *ArraySize,
+ const std::string &NameStr, BasicBlock *InsertAtEnd)
: AllocationInst(Ty, ArraySize, Malloc, 0, NameStr, InsertAtEnd) {}
MallocInst(const Type *Ty, const std::string &NameStr,
BasicBlock *InsertAtEnd)
: AllocationInst(Ty, 0, Malloc, 0, NameStr, InsertAtEnd) {}
- MallocInst(const Type *Ty, Value *ArraySize, unsigned Align,
- const std::string &NameStr, BasicBlock *InsertAtEnd)
- : AllocationInst(Ty, ArraySize, Malloc, Align, NameStr, InsertAtEnd) {}
- MallocInst(const Type *Ty, Value *ArraySize, unsigned Align,
- const std::string &NameStr = "",
- Instruction *InsertBefore = 0)
- : AllocationInst(Ty, ArraySize, Malloc, Align, NameStr, InsertBefore) {}
+ MallocInst(const Type *Ty, Value *ArraySize,
+ unsigned Align, const std::string &NameStr,
+ BasicBlock *InsertAtEnd)
+ : AllocationInst(Ty, ArraySize, Malloc,
+ Align, NameStr, InsertAtEnd) {}
+ MallocInst(const Type *Ty, Value *ArraySize,
+ unsigned Align, const std::string &NameStr = "",
+ Instruction *InsertBefore = 0)
+ : AllocationInst(Ty, ArraySize,
+ Malloc, Align, NameStr, InsertBefore) {}
virtual MallocInst *clone(LLVMContext &Context) const;
class AllocaInst : public AllocationInst {
AllocaInst(const AllocaInst &);
public:
- explicit AllocaInst(const Type *Ty, Value *ArraySize = 0,
+ explicit AllocaInst(const Type *Ty,
+ Value *ArraySize = 0,
const std::string &NameStr = "",
Instruction *InsertBefore = 0)
- : AllocationInst(Ty, ArraySize, Alloca, 0, NameStr, InsertBefore) {}
- AllocaInst(const Type *Ty, Value *ArraySize, const std::string &NameStr,
+ : AllocationInst(Ty, ArraySize, Alloca,
+ 0, NameStr, InsertBefore) {}
+ AllocaInst(const Type *Ty,
+ Value *ArraySize, const std::string &NameStr,
BasicBlock *InsertAtEnd)
: AllocationInst(Ty, ArraySize, Alloca, 0, NameStr, InsertAtEnd) {}
BasicBlock *InsertAtEnd)
: AllocationInst(Ty, 0, Alloca, 0, NameStr, InsertAtEnd) {}
- AllocaInst(const Type *Ty, Value *ArraySize, unsigned Align,
- const std::string &NameStr = "", Instruction *InsertBefore = 0)
- : AllocationInst(Ty, ArraySize, Alloca, Align, NameStr, InsertBefore) {}
- AllocaInst(const Type *Ty, Value *ArraySize, unsigned Align,
- const std::string &NameStr, BasicBlock *InsertAtEnd)
- : AllocationInst(Ty, ArraySize, Alloca, Align, NameStr, InsertAtEnd) {}
+ AllocaInst(const Type *Ty, Value *ArraySize,
+ unsigned Align, const std::string &NameStr = "",
+ Instruction *InsertBefore = 0)
+ : AllocationInst(Ty, ArraySize, Alloca,
+ Align, NameStr, InsertBefore) {}
+ AllocaInst(const Type *Ty, Value *ArraySize,
+ unsigned Align, const std::string &NameStr,
+ BasicBlock *InsertAtEnd)
+ : AllocationInst(Ty, ArraySize, Alloca,
+ Align, NameStr, InsertAtEnd) {}
virtual AllocaInst *clone(LLVMContext &Context) const;
}
ExtractElementInst(Value *Vec, Value *Idx, const std::string &NameStr = "",
Instruction *InsertBefore = 0);
- ExtractElementInst(Value *Vec, unsigned Idx, const std::string &NameStr = "",
- Instruction *InsertBefore = 0);
ExtractElementInst(Value *Vec, Value *Idx, const std::string &NameStr,
BasicBlock *InsertAtEnd);
- ExtractElementInst(Value *Vec, unsigned Idx, const std::string &NameStr,
- BasicBlock *InsertAtEnd);
/// isValidOperands - Return true if an extractelement instruction can be
/// formed with the specified operands.
InsertElementInst(Value *Vec, Value *NewElt, Value *Idx,
const std::string &NameStr = "",
Instruction *InsertBefore = 0);
- InsertElementInst(Value *Vec, Value *NewElt, unsigned Idx,
- const std::string &NameStr = "",
- Instruction *InsertBefore = 0);
InsertElementInst(Value *Vec, Value *NewElt, Value *Idx,
const std::string &NameStr, BasicBlock *InsertAtEnd);
- InsertElementInst(Value *Vec, Value *NewElt, unsigned Idx,
- const std::string &NameStr, BasicBlock *InsertAtEnd);
public:
static InsertElementInst *Create(const InsertElementInst &IE) {
return new(IE.getNumOperands()) InsertElementInst(IE);
Instruction *InsertBefore = 0) {
return new(3) InsertElementInst(Vec, NewElt, Idx, NameStr, InsertBefore);
}
- static InsertElementInst *Create(Value *Vec, Value *NewElt, unsigned Idx,
- const std::string &NameStr = "",
- Instruction *InsertBefore = 0) {
- return new(3) InsertElementInst(Vec, NewElt, Idx, NameStr, InsertBefore);
- }
static InsertElementInst *Create(Value *Vec, Value *NewElt, Value *Idx,
const std::string &NameStr,
BasicBlock *InsertAtEnd) {
return new(3) InsertElementInst(Vec, NewElt, Idx, NameStr, InsertAtEnd);
}
- static InsertElementInst *Create(Value *Vec, Value *NewElt, unsigned Idx,
- const std::string &NameStr,
- BasicBlock *InsertAtEnd) {
- return new(3) InsertElementInst(Vec, NewElt, Idx, NameStr, InsertAtEnd);
- }
/// isValidOperands - Return true if an insertelement instruction can be
/// formed with the specified operands.