aboutsummaryrefslogtreecommitdiff
path: root/bindings/ocaml/llvm/llvm_ocaml.c
diff options
context:
space:
mode:
authorGordon Henriksen <gordonhenriksen@mac.com>2008-08-09 01:55:52 +0000
committerGordon Henriksen <gordonhenriksen@mac.com>2008-08-09 01:55:52 +0000
commit21491edbf4027df4db559eb1a9aa8fbf3779cfab (patch)
treed36c2a72c7671302f4ed2520da5427d0d1f11a64 /bindings/ocaml/llvm/llvm_ocaml.c
parentb75de8d843cf3574e99c8917c16adbb0e6575e7e (diff)
[PR-2610] Adding Ocaml bindings for Switch::addCase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54571 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings/ocaml/llvm/llvm_ocaml.c')
-rw-r--r--bindings/ocaml/llvm/llvm_ocaml.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/bindings/ocaml/llvm/llvm_ocaml.c b/bindings/ocaml/llvm/llvm_ocaml.c
index 76ad408c35..94bd374594 100644
--- a/bindings/ocaml/llvm/llvm_ocaml.c
+++ b/bindings/ocaml/llvm/llvm_ocaml.c
@@ -848,6 +848,13 @@ CAMLprim LLVMValueRef llvm_build_switch(LLVMValueRef Of,
return LLVMBuildSwitch(Builder_val(B), Of, Else, Int_val(EstimatedCount));
}
+CAMLprim value llvm_add_case(LLVMValueRef Switch,
+ LLVMValueRef OnVal,
+ LLVMBasicBlockRef Dest) {
+ LLVMAddCase(Switch, OnVal, Dest);
+ return Val_unit;
+}
+
/* llvalue -> llvalue array -> llbasicblock -> llbasicblock -> string ->
llbuilder -> llvalue */
CAMLprim LLVMValueRef llvm_build_invoke_nat(LLVMValueRef Fn, value Args,