aboutsummaryrefslogtreecommitdiffstats
path: root/bindings/ocaml/llvm/llvm_ocaml.c
diff options
context:
space:
mode:
authorErick Tryzelaar <idadesub@users.sourceforge.net>2010-02-28 20:45:03 +0000
committerErick Tryzelaar <idadesub@users.sourceforge.net>2010-02-28 20:45:03 +0000
commitb65c5f2ec347db8342cb7e42d072b0088b74fa73 (patch)
tree8729f5e146e008e8344c3286ef8d3b21a14e1194 /bindings/ocaml/llvm/llvm_ocaml.c
parent6ba5c56cf5b1609ec4af45f4901118865a8ed9b6 (diff)
downloadexternal_llvm-b65c5f2ec347db8342cb7e42d072b0088b74fa73.zip
external_llvm-b65c5f2ec347db8342cb7e42d072b0088b74fa73.tar.gz
external_llvm-b65c5f2ec347db8342cb7e42d072b0088b74fa73.tar.bz2
Add support getting the operands of a User to ocaml.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97414 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 78cf6e4..cdd137e 100644
--- a/bindings/ocaml/llvm/llvm_ocaml.c
+++ b/bindings/ocaml/llvm/llvm_ocaml.c
@@ -440,6 +440,13 @@ CAMLprim value llvm_dump_value(LLVMValueRef Val) {
return Val_unit;
}
+/*--... Operations on users ................................................--*/
+
+/* llvalue -> int -> llvalue */
+CAMLprim LLVMValueRef llvm_operand(LLVMValueRef V, value I) {
+ return LLVMGetOperand(V, Int_val(I));
+}
+
/*--... Operations on constants of (mostly) any type .......................--*/
/* llvalue -> bool */