[OCaml] De-duplicate llvm_raise and llvm_string_of_message.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220898 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Peter Zotov
2014-10-30 08:29:29 +00:00
parent d07e7ecd85
commit b9f3251952
7 changed files with 14 additions and 71 deletions

View File

@@ -25,16 +25,7 @@
#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 .......................................--*/