add IRBuilder support for IndirectBr

llvm-svn: 85445
This commit is contained in:
Chris Lattner 2009-10-28 23:25:00 +00:00
parent 1c9401ec15
commit 48d9995d2b
1 changed files with 7 additions and 0 deletions

View File

@ -253,6 +253,13 @@ public:
return Insert(SwitchInst::Create(V, Dest, NumCases));
}
/// CreateIndirectBr - Create an indirect branch instruction with the
/// specified address operand, with an optional hint for the number of
/// destinations that will be added (for efficient allocation).
IndirectBrInst *CreateIndirectBr(Value *Addr, unsigned NumDests = 10) {
return Insert(IndirectBrInst::Create(Addr, NumDests));
}
/// CreateInvoke - Create an invoke instruction.
template<typename InputIterator>
InvokeInst *CreateInvoke(Value *Callee, BasicBlock *NormalDest,