summaryrefslogtreecommitdiffstats
path: root/llvm/bindings/ocaml/target/target_ocaml.c
diff options
context:
space:
mode:
authorPeter Zotov <whitequark@whitequark.org>2014-10-30 08:29:29 +0000
committerPeter Zotov <whitequark@whitequark.org>2014-10-30 08:29:29 +0000
commit1b254f9a56b8647ea0101ee49ff00fd4a810b6d4 (patch)
tree7bcd4627f2d7870e9a9fcd7b82dcc7ece710bdd2 /llvm/bindings/ocaml/target/target_ocaml.c
parenta2c5153edd2a4abb4a5a168e28b0be03bdf1f607 (diff)
downloadbcm5719-llvm-1b254f9a56b8647ea0101ee49ff00fd4a810b6d4.tar.gz
bcm5719-llvm-1b254f9a56b8647ea0101ee49ff00fd4a810b6d4.zip
[OCaml] De-duplicate llvm_raise and llvm_string_of_message.
llvm-svn: 220898
Diffstat (limited to 'llvm/bindings/ocaml/target/target_ocaml.c')
-rw-r--r--llvm/bindings/ocaml/target/target_ocaml.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/llvm/bindings/ocaml/target/target_ocaml.c b/llvm/bindings/ocaml/target/target_ocaml.c
index efb5d9bd51e..8f77cb46f13 100644
--- a/llvm/bindings/ocaml/target/target_ocaml.c
+++ b/llvm/bindings/ocaml/target/target_ocaml.c
@@ -23,25 +23,8 @@
#include "caml/custom.h"
#include "caml/callback.h"
-/*===---- Exceptions ------------------------------------------------------===*/
-
-static void llvm_raise(value Prototype, char *Message) {
- CAMLparam1(Prototype);
- CAMLlocal1(CamlMessage);
-
- CamlMessage = copy_string(Message);
- LLVMDisposeMessage(Message);
-
- raise_with_arg(Prototype, CamlMessage);
- CAMLnoreturn;
-}
-
-static value llvm_string_of_message(char* Message) {
- value String = caml_copy_string(Message);
- LLVMDisposeMessage(Message);
-
- return String;
-}
+void llvm_raise(value Prototype, char *Message);
+value llvm_string_of_message(char* Message);
/*===---- Data Layout -----------------------------------------------------===*/
OpenPOWER on IntegriCloud