aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Support/IRBuilder.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Support/IRBuilder.h b/include/llvm/Support/IRBuilder.h
index 84bfd09b00..8f26cea34c 100644
--- a/include/llvm/Support/IRBuilder.h
+++ b/include/llvm/Support/IRBuilder.h
@@ -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,