[LLVMdev] a typo in OCaml bindings

Jianzhou Zhao jianzhou at seas.upenn.edu
Wed Aug 18 13:39:53 PDT 2010


Hi,

revision 111418

binding/ocaml/llvm/llvm_ocaml.c
/* llvalue -> int -> llvalue */
CAMLprim value llvm_params(LLVMValueRef Fn, value Index) {
  value Params = alloc(LLVMCountParams(Fn), 0);
  LLVMGetParams(Fn, (LLVMValueRef *) Op_val(Params));
  return Params;
}

does not match the interface at binding/ocaml/llvm/llvm.ml

external params : llvalue -> llvalue array = "llvm_params"

It should be

/* llvalue -> llvalue */
CAMLprim value llvm_params(LLVMValueRef Fn) { ...

This cannot be checked unless an OCaml runtime uses 'params' and fails
to find the corresponding C function.

BR
-- 
Jianzhou



More information about the llvm-dev mailing list