Rename some ocaml functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97684 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Erick Tryzelaar 2010-03-03 23:51:30 +00:00
parent 7b3afb4547
commit 9c7c566efe
3 changed files with 13 additions and 13 deletions

View File

@ -91,7 +91,7 @@ CAMLprim value llvm_genericvalue_of_float(LLVMTypeRef Ty, value N) {
} }
/* 'a -> t */ /* 'a -> t */
CAMLprim value llvm_genericvalue_of_value(value V) { CAMLprim value llvm_genericvalue_of_pointer(value V) {
CAMLparam1(V); CAMLparam1(V);
CAMLreturn(alloc_generic_value(LLVMCreateGenericValueOfPointer(Op_val(V)))); CAMLreturn(alloc_generic_value(LLVMCreateGenericValueOfPointer(Op_val(V))));
} }
@ -130,7 +130,7 @@ CAMLprim value llvm_genericvalue_as_float(LLVMTypeRef Ty, value GenVal) {
} }
/* t -> 'a */ /* t -> 'a */
CAMLprim value llvm_genericvalue_as_value(value GenVal) { CAMLprim value llvm_genericvalue_as_pointer(value GenVal) {
return Val_op(LLVMGenericValueToPointer(Genericvalue_val(GenVal))); return Val_op(LLVMGenericValueToPointer(Genericvalue_val(GenVal)));
} }
@ -204,14 +204,14 @@ CAMLprim value llvm_ee_dispose(LLVMExecutionEngineRef EE) {
} }
/* llmodule -> ExecutionEngine.t -> unit */ /* llmodule -> ExecutionEngine.t -> unit */
CAMLprim value llvm_ee_add_mp(LLVMModuleRef M, LLVMExecutionEngineRef EE) { CAMLprim value llvm_ee_add_module(LLVMModuleRef M, LLVMExecutionEngineRef EE) {
LLVMAddModule(EE, M); LLVMAddModule(EE, M);
return Val_unit; return Val_unit;
} }
/* llmodule -> ExecutionEngine.t -> llmodule */ /* llmodule -> ExecutionEngine.t -> llmodule */
CAMLprim LLVMModuleRef llvm_ee_remove_mp(LLVMModuleRef M, CAMLprim LLVMModuleRef llvm_ee_remove_module(LLVMModuleRef M,
LLVMExecutionEngineRef EE) { LLVMExecutionEngineRef EE) {
LLVMModuleRef RemovedModule; LLVMModuleRef RemovedModule;
char *Error; char *Error;
if (LLVMRemoveModule(EE, M, &RemovedModule, &Error)) if (LLVMRemoveModule(EE, M, &RemovedModule, &Error))

View File

@ -20,7 +20,7 @@ module GenericValue = struct
external of_float: Llvm.lltype -> float -> t external of_float: Llvm.lltype -> float -> t
= "llvm_genericvalue_of_float" = "llvm_genericvalue_of_float"
external of_pointer: 'a -> t external of_pointer: 'a -> t
= "llvm_genericvalue_of_value" = "llvm_genericvalue_of_pointer"
external of_int32: Llvm.lltype -> int32 -> t external of_int32: Llvm.lltype -> int32 -> t
= "llvm_genericvalue_of_int32" = "llvm_genericvalue_of_int32"
external of_int: Llvm.lltype -> int -> t external of_int: Llvm.lltype -> int -> t
@ -33,7 +33,7 @@ module GenericValue = struct
external as_float: Llvm.lltype -> t -> float external as_float: Llvm.lltype -> t -> float
= "llvm_genericvalue_as_float" = "llvm_genericvalue_as_float"
external as_pointer: t -> 'a external as_pointer: t -> 'a
= "llvm_genericvalue_as_value" = "llvm_genericvalue_as_pointer"
external as_int32: t -> int32 external as_int32: t -> int32
= "llvm_genericvalue_as_int32" = "llvm_genericvalue_as_int32"
external as_int: t -> int external as_int: t -> int
@ -65,9 +65,9 @@ module ExecutionEngine = struct
external dispose: t -> unit external dispose: t -> unit
= "llvm_ee_dispose" = "llvm_ee_dispose"
external add_module: Llvm.llmodule -> t -> unit external add_module: Llvm.llmodule -> t -> unit
= "llvm_ee_add_mp" = "llvm_ee_add_module"
external remove_module: Llvm.llmodule -> t -> Llvm.llmodule external remove_module: Llvm.llmodule -> t -> Llvm.llmodule
= "llvm_ee_remove_mp" = "llvm_ee_remove_module"
external find_function: string -> t -> Llvm.llvalue option external find_function: string -> t -> Llvm.llvalue option
= "llvm_ee_find_function" = "llvm_ee_find_function"
external run_function: Llvm.llvalue -> GenericValue.t array -> t -> external run_function: Llvm.llvalue -> GenericValue.t array -> t ->

View File

@ -29,7 +29,7 @@ module GenericValue: sig
(** [of_pointer v] boxes the pointer value [v] in a generic value. See the (** [of_pointer v] boxes the pointer value [v] in a generic value. See the
field [llvm::GenericValue::PointerVal]. *) field [llvm::GenericValue::PointerVal]. *)
external of_pointer : 'a -> t = "llvm_genericvalue_of_value" external of_pointer : 'a -> t = "llvm_genericvalue_of_pointer"
(** [of_int32 n w] boxes the int32 [i] in a generic value with the bitwidth (** [of_int32 n w] boxes the int32 [i] in a generic value with the bitwidth
[w]. See the field [llvm::GenericValue::IntVal]. *) [w]. See the field [llvm::GenericValue::IntVal]. *)
@ -55,7 +55,7 @@ module GenericValue: sig
(** [as_pointer gv] unboxes the pointer-valued generic value [gv]. See the (** [as_pointer gv] unboxes the pointer-valued generic value [gv]. See the
field [llvm::GenericValue::PointerVal]. *) field [llvm::GenericValue::PointerVal]. *)
external as_pointer : t -> 'a = "llvm_genericvalue_as_value" external as_pointer : t -> 'a = "llvm_genericvalue_as_pointer"
(** [as_int32 gv] unboxes the integer-valued generic value [gv] as an [int32]. (** [as_int32 gv] unboxes the integer-valued generic value [gv] as an [int32].
Is invalid if [gv] has a bitwidth greater than 32 bits. See the field Is invalid if [gv] has a bitwidth greater than 32 bits. See the field
@ -71,7 +71,7 @@ module GenericValue: sig
(** [as_natint gv] unboxes the integer-valued generic value [gv] as a (** [as_natint gv] unboxes the integer-valued generic value [gv] as a
[nativeint]. Is invalid if [gv] has a bitwidth greater than [nativeint]. Is invalid if [gv] has a bitwidth greater than
[nativeint]. See the field [llvm::GenericValue::IntVal]. *) [nativeint]. See the field [llvm::GenericValue::IntVal]. *)
external as_nativeint : t -> nativeint = "llvm_genericvalue_as_int" external as_nativeint : t -> nativeint = "llvm_genericvalue_as_nativeint"
(** [as_int64 gv] returns the integer-valued generic value [gv] as an [int64]. (** [as_int64 gv] returns the integer-valued generic value [gv] as an [int64].
Is invalid if [gv] has a bitwidth greater than [int64]. See the field Is invalid if [gv] has a bitwidth greater than [int64]. See the field
@ -112,7 +112,7 @@ module ExecutionEngine: sig
external dispose : t -> unit = "llvm_ee_dispose" external dispose : t -> unit = "llvm_ee_dispose"
(** [add_module m ee] adds the module [m] to the execution engine [ee]. *) (** [add_module m ee] adds the module [m] to the execution engine [ee]. *)
external add_module : Llvm.llmodule -> t -> unit = "llvm_ee_add_mp" external add_module : Llvm.llmodule -> t -> unit = "llvm_ee_add_module"
(** [remove_module m ee] removes the module [m] from the execution engine (** [remove_module m ee] removes the module [m] from the execution engine
[ee], disposing of [m] and the module referenced by [mp]. Raises [ee], disposing of [m] and the module referenced by [mp]. Raises