[OCaml] Don't truncate constants over 32 bits in Llvm.const_int.
[oota-llvm.git] / bindings / ocaml / llvm / llvm_ocaml.c
index d5ebdcd3e31af05ca37a779619378329a2b9734d..2044856ef2dabd921f1a12f7613856b6038e1d77 100644 (file)
@@ -695,7 +695,7 @@ CAMLprim value llvm_append_namedmd(LLVMModuleRef M, value Name, LLVMValueRef Val
 
 /* lltype -> int -> llvalue */
 CAMLprim LLVMValueRef llvm_const_int(LLVMTypeRef IntTy, value N) {
-  return LLVMConstInt(IntTy, (long long) Int_val(N), 1);
+  return LLVMConstInt(IntTy, (long long) Long_val(N), 1);
 }
 
 /* lltype -> Int64.t -> bool -> llvalue */