aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-28 23:25:00 +0000
committerChris Lattner <sabre@nondot.org>2009-10-28 23:25:00 +0000
commita809d2fb2759807e11babd294e4257ff45c220de (patch)
treeb09cd163c48ffe3e764e8df10a45336eed72d1d4
parent2c04dae715b05017d7d2c19ab4f8cb37c1e650ae (diff)
add IRBuilder support for IndirectBr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85445 91177308-0d34-0410-b5e6-96231b3b80d8
-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,