projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add support getting the operands of a User to ocaml.
[oota-llvm.git]
/
bindings
/
ocaml
/
llvm
/
llvm_ocaml.c
diff --git
a/bindings/ocaml/llvm/llvm_ocaml.c
b/bindings/ocaml/llvm/llvm_ocaml.c
index 78cf6e436851377cd05e02f8e573e9477a4f1bd5..cdd137e51bc0650b4c590d734864a524366aedac 100644
(file)
--- 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;
}
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 */
/*--... Operations on constants of (mostly) any type .......................--*/
/* llvalue -> bool */