projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[OCaml] Add Llvm.instr_clone.
[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 f0143a01a9be03659fd2690bffb3d2aaaf0797fd..a8f7b782a187f8cd1539ed8b104e4a46aae8e3c8 100644
(file)
--- a/
bindings/ocaml/llvm/llvm_ocaml.c
+++ b/
bindings/ocaml/llvm/llvm_ocaml.c
@@
-1358,6
+1358,13
@@
CAMLprim value llvm_instr_icmp_predicate(LLVMValueRef Val) {
CAMLreturn(Val_int(0));
}
CAMLreturn(Val_int(0));
}
+/* llvalue -> llvalue */
+CAMLprim LLVMValueRef llvm_instr_clone(LLVMValueRef Inst) {
+ if (!LLVMIsAInstruction(Inst))
+ failwith("Not an instruction");
+ return LLVMInstructionClone(Inst);
+}
+
/*--... Operations on call sites ...........................................--*/
/*--... Operations on call sites ...........................................--*/