[llvm] r221143 - [OCaml] Don't use deprecated non-caml_namespaced functions.

Peter Zotov whitequark at whitequark.org
Mon Nov 3 01:51:47 PST 2014


Author: whitequark
Date: Mon Nov  3 03:51:47 2014
New Revision: 221143

URL: http://llvm.org/viewvc/llvm-project?rev=221143&view=rev
Log:
[OCaml] Don't use deprecated non-caml_namespaced functions.

Modified:
    llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c

Modified: llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c?rev=221143&r1=221142&r2=221143&view=diff
==============================================================================
--- llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c (original)
+++ llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c Mon Nov  3 03:51:47 2014
@@ -34,14 +34,14 @@ value llvm_string_of_message(char* Messa
 
 void llvm_raise(value Prototype, char *Message) {
   CAMLparam1(Prototype);
-  raise_with_arg(Prototype, llvm_string_of_message(Message));
+  caml_raise_with_arg(Prototype, llvm_string_of_message(Message));
   CAMLnoreturn;
 }
 
 static value llvm_fatal_error_handler;
 
 static void llvm_fatal_error_trampoline(const char *Reason) {
-  callback(llvm_fatal_error_handler, copy_string(Reason));
+  callback(llvm_fatal_error_handler, caml_copy_string(Reason));
 }
 
 CAMLprim value llvm_install_fatal_error_handler(value Handler) {
@@ -155,7 +155,7 @@ CAMLprim value llvm_dispose_module(LLVMM
 
 /* llmodule -> string */
 CAMLprim value llvm_target_triple(LLVMModuleRef M) {
-  return copy_string(LLVMGetTarget(M));
+  return caml_copy_string(LLVMGetTarget(M));
 }
 
 /* string -> llmodule -> unit */
@@ -166,7 +166,7 @@ CAMLprim value llvm_set_target_triple(va
 
 /* llmodule -> string */
 CAMLprim value llvm_data_layout(LLVMModuleRef M) {
-  return copy_string(LLVMGetDataLayout(M));
+  return caml_copy_string(LLVMGetDataLayout(M));
 }
 
 /* string -> llmodule -> unit */
@@ -539,7 +539,7 @@ CAMLprim value llvm_classify_value(LLVMV
 
 /* llvalue -> string */
 CAMLprim value llvm_value_name(LLVMValueRef Val) {
-  return copy_string(LLVMGetValueName(Val));
+  return caml_copy_string(LLVMGetValueName(Val));
 }
 
 /* string -> llvalue -> unit */
@@ -937,7 +937,7 @@ CAMLprim value llvm_set_linkage(value Li
 
 /* llvalue -> string */
 CAMLprim value llvm_section(LLVMValueRef Global) {
-  return copy_string(LLVMGetSection(Global));
+  return caml_copy_string(LLVMGetSection(Global));
 }
 
 /* string -> llvalue -> unit */
@@ -1220,7 +1220,7 @@ CAMLprim value llvm_gc(LLVMValueRef Fn)
   CAMLlocal2(Name, Option);
 
   if ((GC = LLVMGetGC(Fn))) {
-    Name = copy_string(GC);
+    Name = caml_copy_string(GC);
 
     Option = alloc(1, 0);
     Field(Option, 0) = Name;





More information about the llvm-commits mailing list