diff options
Diffstat (limited to 'bindings/ocaml/llvm/llvm.mli')
-rw-r--r-- | bindings/ocaml/llvm/llvm.mli | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/bindings/ocaml/llvm/llvm.mli b/bindings/ocaml/llvm/llvm.mli index 5aedefb..a7d26de 100644 --- a/bindings/ocaml/llvm/llvm.mli +++ b/bindings/ocaml/llvm/llvm.mli @@ -1212,13 +1212,20 @@ external build_br : llbasicblock -> llbuilder -> llvalue = "llvm_build_br" external build_cond_br : llvalue -> llbasicblock -> llbasicblock -> llbuilder -> llvalue = "llvm_build_cond_br" -(** [build_switch case elsebb b] creates an empty +(** [build_switch case elsebb count b] creates an empty [switch %case, %elsebb] - instruction at the position specified by the instruction builder [b]. + instruction at the position specified by the instruction builder [b] with + space reserved for [count] cases. See the method [llvm::LLVMBuilder::CreateSwitch]. *) external build_switch : llvalue -> llbasicblock -> int -> llbuilder -> llvalue = "llvm_build_switch" +(** [add_case sw onval bb] causes switch instruction [sw] to branch to [bb] + when its input matches the constant [onval]. + See the method [llvm::SwitchInst::addCase]. **) +external add_case : llvalue -> llvalue -> llbasicblock -> unit + = "llvm_add_case" + (** [build_invoke fn args tobb unwindbb name b] creates an [%name = invoke %fn(args) to %tobb unwind %unwindbb] instruction at the position specified by the instruction builder [b]. |