From a809d2fb2759807e11babd294e4257ff45c220de Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 28 Oct 2009 23:25:00 +0000 Subject: [PATCH] add IRBuilder support for IndirectBr git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85445 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/IRBuilder.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/llvm/Support/IRBuilder.h b/include/llvm/Support/IRBuilder.h index 84bfd09b001..8f26cea34cf 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 InvokeInst *CreateInvoke(Value *Callee, BasicBlock *NormalDest, -- 2.34.1