[llvm-commits] [llvm] r85445 - /llvm/trunk/include/llvm/Support/IRBuilder.h
Chris Lattner
sabre at nondot.org
Wed Oct 28 16:25:01 PDT 2009
Author: lattner
Date: Wed Oct 28 18:25:00 2009
New Revision: 85445
URL: http://llvm.org/viewvc/llvm-project?rev=85445&view=rev
Log:
add IRBuilder support for IndirectBr
Modified:
llvm/trunk/include/llvm/Support/IRBuilder.h
Modified: llvm/trunk/include/llvm/Support/IRBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/IRBuilder.h?rev=85445&r1=85444&r2=85445&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/IRBuilder.h (original)
+++ llvm/trunk/include/llvm/Support/IRBuilder.h Wed Oct 28 18:25:00 2009
@@ -253,6 +253,13 @@
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,
More information about the llvm-commits
mailing list