1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

[OCaml] Fix ABI incompatibility

OCaml's type unit is not compatible with C's type void.

llvm-svn: 193952
This commit is contained in:
Peter Zotov 2013-11-03 08:27:37 +00:00
parent aa2a604cf0
commit 57d8f2c2e9
2 changed files with 8 additions and 1 deletions

View File

@ -332,7 +332,7 @@ external value_name : llvalue -> string = "llvm_value_name"
external set_value_name : string -> llvalue -> unit = "llvm_set_value_name" external set_value_name : string -> llvalue -> unit = "llvm_set_value_name"
external dump_value : llvalue -> unit = "llvm_dump_value" external dump_value : llvalue -> unit = "llvm_dump_value"
external replace_all_uses_with : llvalue -> llvalue -> unit external replace_all_uses_with : llvalue -> llvalue -> unit
= "LLVMReplaceAllUsesWith" = "llvm_replace_all_uses_with"
(*--... Operations on uses .................................................--*) (*--... Operations on uses .................................................--*)
external use_begin : llvalue -> lluse option = "llvm_use_begin" external use_begin : llvalue -> lluse option = "llvm_use_begin"

View File

@ -485,6 +485,13 @@ CAMLprim value llvm_dump_value(LLVMValueRef Val) {
return Val_unit; return Val_unit;
} }
/* llvalue -> llvalue -> unit */
CAMLprim value llvm_replace_all_uses_with(LLVMValueRef OldVal,
LLVMValueRef NewVal) {
LLVMReplaceAllUsesWith(OldVal, NewVal);
return Val_unit;
}
/*--... Operations on users ................................................--*/ /*--... Operations on users ................................................--*/
/* llvalue -> int -> llvalue */ /* llvalue -> int -> llvalue */