Add some helpers for Invoke to mirror CreateCall helpers.

llvm-svn: 90508
This commit is contained in:
Mike Stump 2009-12-04 01:26:26 +00:00
parent 2bd9609992
commit bcb77c985b
1 changed files with 13 additions and 0 deletions

View File

@ -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,