forked from OSchip/llvm-project
Add some helpers for Invoke to mirror CreateCall helpers.
llvm-svn: 90508
This commit is contained in:
parent
2bd9609992
commit
bcb77c985b
|
@ -269,6 +269,19 @@ public:
|
|||
return Insert(IndirectBrInst::Create(Addr, NumDests));
|
||||
}
|
||||
|
||||
InvokeInst *CreateInvoke(Value *Callee, BasicBlock *NormalDest,
|
||||
BasicBlock *UnwindDest, const Twine &Name = "") {
|
||||
Value *Args[] = { 0 };
|
||||
return Insert(InvokeInst::Create(Callee, NormalDest, UnwindDest, Args,
|
||||
Args), Name);
|
||||
}
|
||||
InvokeInst *CreateInvoke(Value *Callee, BasicBlock *NormalDest,
|
||||
BasicBlock *UnwindDest, Value *Arg1,
|
||||
const Twine &Name = "") {
|
||||
Value *Args[] = { Arg1 };
|
||||
return Insert(InvokeInst::Create(Callee, NormalDest, UnwindDest, Args,
|
||||
Args+1), Name);
|
||||
}
|
||||
/// CreateInvoke - Create an invoke instruction.
|
||||
template<typename InputIterator>
|
||||
InvokeInst *CreateInvoke(Value *Callee, BasicBlock *NormalDest,
|
||||
|
|
Loading…
Reference in New Issue