diff options
author | Peter Zotov <whitequark@whitequark.org> | 2014-10-30 08:29:29 +0000 |
---|---|---|
committer | Peter Zotov <whitequark@whitequark.org> | 2014-10-30 08:29:29 +0000 |
commit | 1b254f9a56b8647ea0101ee49ff00fd4a810b6d4 (patch) | |
tree | 7bcd4627f2d7870e9a9fcd7b82dcc7ece710bdd2 /llvm/bindings/ocaml/target/target_ocaml.c | |
parent | a2c5153edd2a4abb4a5a168e28b0be03bdf1f607 (diff) | |
download | bcm5719-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.c | 21 |
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 -----------------------------------------------------===*/ |