summaryrefslogtreecommitdiffstats
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
commit48d9995d2ba86daf86396dbe847235fcf492bbbe (patch)
treeee5b3bc5bdd487ebae017c604f8d5b0e1d324303
parent1c9401ec15ccce6e8d9f94fe825de5aafc666af8 (diff)
downloadbcm5719-llvm-48d9995d2ba86daf86396dbe847235fcf492bbbe.tar.gz
bcm5719-llvm-48d9995d2ba86daf86396dbe847235fcf492bbbe.zip
add IRBuilder support for IndirectBr
llvm-svn: 85445
-rw-r--r--llvm/include/llvm/Support/IRBuilder.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/IRBuilder.h b/llvm/include/llvm/Support/IRBuilder.h
index 84bfd09b001..8f26cea34cf 100644
--- a/llvm/include/llvm/Support/IRBuilder.h
+++ b/llvm/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,
OpenPOWER on IntegriCloud