aboutsummaryrefslogtreecommitdiffstats
path: root/bindings/ocaml/llvm/llvm_ocaml.c
diff options
context:
space:
mode:
authorGordon Henriksen <gordonhenriksen@mac.com>2007-12-29 20:45:00 +0000
committerGordon Henriksen <gordonhenriksen@mac.com>2007-12-29 20:45:00 +0000
commit01c5ebed68935f06c557bad3cc1a02768acf8ec0 (patch)
tree3c1111e6f78118c02964ced26c7aca9de33bcaf1 /bindings/ocaml/llvm/llvm_ocaml.c
parent5f5a573621dd45c94c96deebea973c31784ddaea (diff)
downloadexternal_llvm-01c5ebed68935f06c557bad3cc1a02768acf8ec0.zip
external_llvm-01c5ebed68935f06c557bad3cc1a02768acf8ec0.tar.gz
external_llvm-01c5ebed68935f06c557bad3cc1a02768acf8ec0.tar.bz2
Bindings for instruction calling conventions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45422 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings/ocaml/llvm/llvm_ocaml.c')
-rw-r--r--bindings/ocaml/llvm/llvm_ocaml.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/bindings/ocaml/llvm/llvm_ocaml.c b/bindings/ocaml/llvm/llvm_ocaml.c
index d095550..35c2c8d 100644
--- a/bindings/ocaml/llvm/llvm_ocaml.c
+++ b/bindings/ocaml/llvm/llvm_ocaml.c
@@ -652,6 +652,19 @@ CAMLprim value llvm_value_is_block(LLVMValueRef Val) {
return Val_bool(LLVMValueIsBasicBlock(Val));
}
+/*--... Operations on call sites ...........................................--*/
+
+/* llvalue -> int */
+CAMLprim value llvm_instruction_call_conv(LLVMValueRef Inst) {
+ return Val_int(LLVMGetInstructionCallConv(Inst));
+}
+
+/* int -> llvalue -> unit */
+CAMLprim value llvm_set_instruction_call_conv(value CC, LLVMValueRef Inst) {
+ LLVMSetInstructionCallConv(Inst, Int_val(CC));
+ return Val_unit;
+}
+
/*--... Operations on phi nodes ............................................--*/
/* (llvalue * llbasicblock) -> llvalue -> unit */