}
CleanupReturnInst *CreateCleanupRet(BasicBlock *UnwindBB = nullptr,
- Value *RetVal = nullptr) {
+ Value *RetVal = nullptr) {
return Insert(CleanupReturnInst::Create(Context, RetVal, UnwindBB));
}
CatchPadInst *CreateCatchPad(Type *Ty, BasicBlock *NormalDest,
- BasicBlock *UnwindDest,
- ArrayRef<Value *> Args,
- const Twine &Name = "") {
- return Insert(CatchPadInst::Create(Ty, NormalDest, UnwindDest, Args),
- Name);
+ BasicBlock *UnwindDest, ArrayRef<Value *> Args,
+ const Twine &Name = "") {
+ return Insert(CatchPadInst::Create(Ty, NormalDest, UnwindDest, Args), Name);
}
CatchEndPadInst *CreateCatchEndPad(BasicBlock *UnwindBB = nullptr) {
}
TerminatePadInst *CreateTerminatePad(BasicBlock *UnwindBB = nullptr,
- ArrayRef<Value *> Args = {},
- const Twine &Name = "") {
+ ArrayRef<Value *> Args = {},
+ const Twine &Name = "") {
return Insert(TerminatePadInst::Create(Context, UnwindBB, Args), Name);
}
CleanupPadInst *CreateCleanupPad(Type *Ty, ArrayRef<Value *> Args,
- const Twine &Name = "") {
+ const Twine &Name = "") {
return Insert(CleanupPadInst::Create(Ty, Args), Name);
}
private:
void init(BasicBlock *UnwindBB);
CatchEndPadInst(LLVMContext &C, BasicBlock *UnwindBB, unsigned Values,
- Instruction *InsertBefore = nullptr);
+ Instruction *InsertBefore = nullptr);
CatchEndPadInst(LLVMContext &C, BasicBlock *UnwindBB, unsigned Values,
- BasicBlock *InsertAtEnd);
+ BasicBlock *InsertAtEnd);
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
CatchEndPadInst *cloneImpl() const;
public:
- static CatchEndPadInst *Create(LLVMContext &C,
- BasicBlock *UnwindBB = nullptr,
- Instruction *InsertBefore = nullptr) {
+ static CatchEndPadInst *Create(LLVMContext &C, BasicBlock *UnwindBB = nullptr,
+ Instruction *InsertBefore = nullptr) {
unsigned Values = UnwindBB ? 1 : 0;
return new (Values) CatchEndPadInst(C, UnwindBB, Values, InsertBefore);
}
static CatchEndPadInst *Create(LLVMContext &C, BasicBlock *UnwindBB,
- BasicBlock *InsertAtEnd) {
+ BasicBlock *InsertAtEnd) {
unsigned Values = UnwindBB ? 1 : 0;
return new (Values) CatchEndPadInst(C, UnwindBB, Values, InsertAtEnd);
}
CatchPadInst(const CatchPadInst &CPI);
explicit CatchPadInst(Type *RetTy, BasicBlock *IfNormal,
- BasicBlock *IfException, ArrayRef<Value *> Args,
- unsigned Values, const Twine &NameStr,
- Instruction *InsertBefore);
+ BasicBlock *IfException, ArrayRef<Value *> Args,
+ unsigned Values, const Twine &NameStr,
+ Instruction *InsertBefore);
explicit CatchPadInst(Type *RetTy, BasicBlock *IfNormal,
- BasicBlock *IfException, ArrayRef<Value *> Args,
- unsigned Values, const Twine &NameStr,
- BasicBlock *InsertAtEnd);
+ BasicBlock *IfException, ArrayRef<Value *> Args,
+ unsigned Values, const Twine &NameStr,
+ BasicBlock *InsertAtEnd);
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
public:
static CatchPadInst *Create(Type *RetTy, BasicBlock *IfNormal,
- BasicBlock *IfException, ArrayRef<Value *> Args,
- const Twine &NameStr = "",
- Instruction *InsertBefore = nullptr) {
+ BasicBlock *IfException, ArrayRef<Value *> Args,
+ const Twine &NameStr = "",
+ Instruction *InsertBefore = nullptr) {
unsigned Values = unsigned(Args.size()) + 2;
- return new (Values) CatchPadInst(RetTy, IfNormal, IfException, Args,
- Values, NameStr, InsertBefore);
+ return new (Values) CatchPadInst(RetTy, IfNormal, IfException, Args, Values,
+ NameStr, InsertBefore);
}
static CatchPadInst *Create(Type *RetTy, BasicBlock *IfNormal,
- BasicBlock *IfException, ArrayRef<Value *> Args,
- const Twine &NameStr, BasicBlock *InsertAtEnd) {
+ BasicBlock *IfException, ArrayRef<Value *> Args,
+ const Twine &NameStr, BasicBlock *InsertAtEnd) {
unsigned Values = unsigned(Args.size()) + 2;
- return new (Values) CatchPadInst(RetTy, IfNormal, IfException, Args,
- Values, NameStr, InsertAtEnd);
+ return new (Values) CatchPadInst(RetTy, IfNormal, IfException, Args, Values,
+ NameStr, InsertAtEnd);
}
/// Provide fast operand accessors
CleanupPadInst(const CleanupPadInst &CPI);
explicit CleanupPadInst(Type *RetTy, ArrayRef<Value *> Args,
- const Twine &NameStr, Instruction *InsertBefore);
+ const Twine &NameStr, Instruction *InsertBefore);
explicit CleanupPadInst(Type *RetTy, ArrayRef<Value *> Args,
- const Twine &NameStr, BasicBlock *InsertAtEnd);
+ const Twine &NameStr, BasicBlock *InsertAtEnd);
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
public:
static CleanupPadInst *Create(Type *RetTy, ArrayRef<Value *> Args,
- const Twine &NameStr = "",
- Instruction *InsertBefore = nullptr) {
- return new (Args.size())
- CleanupPadInst(RetTy, Args, NameStr, InsertBefore);
+ const Twine &NameStr = "",
+ Instruction *InsertBefore = nullptr) {
+ return new (Args.size()) CleanupPadInst(RetTy, Args, NameStr, InsertBefore);
}
static CleanupPadInst *Create(Type *RetTy, ArrayRef<Value *> Args,
- const Twine &NameStr,
- BasicBlock *InsertAtEnd) {
- return new (Args.size())
- CleanupPadInst(RetTy, Args, NameStr, InsertAtEnd);
+ const Twine &NameStr, BasicBlock *InsertAtEnd) {
+ return new (Args.size()) CleanupPadInst(RetTy, Args, NameStr, InsertAtEnd);
}
/// Provide fast operand accessors