[OCaml] De-duplicate llvm_raise and llvm_string_of_message.
[oota-llvm.git] / bindings / ocaml / executionengine / executionengine_ocaml.c
index a12cc0091ae7bf0be34bf3cd8bd593665a20c219..c647d23133c3be504b942163212eba0ed4616a7b 100644 (file)
 #include "caml/memory.h"
 #include "caml/callback.h"
 
-static void llvm_raise(value Prototype, char *Message) {
-  CAMLparam1(Prototype);
-  CAMLlocal1(CamlMessage);
-
-  CamlMessage = copy_string(Message);
-  LLVMDisposeMessage(Message);
-
-  raise_with_arg(Prototype, CamlMessage);
-  CAMLnoreturn;
-}
+void llvm_raise(value Prototype, char *Message);
 
 /*--... Operations on generic values .......................................--*/