[PATCH] D18675: [OCaml] Use LLVMCreateMessage with constant strings when calling llvm_raise
Jeroen Ketema via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 1 01:01:38 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL265116: [OCaml] Use LLVMCreateMessage with constant strings when calling llvm_raise (authored by jketema).
Changed prior to commit:
http://reviews.llvm.org/D18675?vs=52281&id=52335#toc
Repository:
rL LLVM
http://reviews.llvm.org/D18675
Files:
llvm/trunk/bindings/ocaml/analysis/analysis_ocaml.c
llvm/trunk/bindings/ocaml/bitreader/bitreader_ocaml.c
llvm/trunk/bindings/ocaml/linker/linker_ocaml.c
llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c
Index: llvm/trunk/bindings/ocaml/linker/linker_ocaml.c
===================================================================
--- llvm/trunk/bindings/ocaml/linker/linker_ocaml.c
+++ llvm/trunk/bindings/ocaml/linker/linker_ocaml.c
@@ -15,6 +15,7 @@
|* *|
\*===----------------------------------------------------------------------===*/
+#include "llvm-c/Core.h"
#include "llvm-c/Linker.h"
#include "caml/alloc.h"
#include "caml/memory.h"
@@ -26,7 +27,7 @@
/* llmodule -> llmodule -> unit */
CAMLprim value llvm_link_modules(LLVMModuleRef Dst, LLVMModuleRef Src) {
if (LLVMLinkModules2(Dst, Src))
- llvm_raise(*caml_named_value("Llvm_linker.Error"), "Linking failed");
+ llvm_raise(*caml_named_value("Llvm_linker.Error"), LLVMCreateMessage("Linking failed"));
return Val_unit;
}
Index: llvm/trunk/bindings/ocaml/analysis/analysis_ocaml.c
===================================================================
--- llvm/trunk/bindings/ocaml/analysis/analysis_ocaml.c
+++ llvm/trunk/bindings/ocaml/analysis/analysis_ocaml.c
@@ -15,8 +15,8 @@
|* *|
\*===----------------------------------------------------------------------===*/
-#include "llvm-c/Core.h"
#include "llvm-c/Analysis.h"
+#include "llvm-c/Core.h"
#include "caml/alloc.h"
#include "caml/mlvalues.h"
#include "caml/memory.h"
Index: llvm/trunk/bindings/ocaml/bitreader/bitreader_ocaml.c
===================================================================
--- llvm/trunk/bindings/ocaml/bitreader/bitreader_ocaml.c
+++ llvm/trunk/bindings/ocaml/bitreader/bitreader_ocaml.c
@@ -13,6 +13,7 @@
\*===----------------------------------------------------------------------===*/
#include "llvm-c/BitReader.h"
+#include "llvm-c/Core.h"
#include "caml/alloc.h"
#include "caml/fail.h"
#include "caml/memory.h"
@@ -25,7 +26,7 @@
LLVMModuleRef M;
if (LLVMGetBitcodeModuleInContext2(C, MemBuf, &M))
- llvm_raise(*caml_named_value("Llvm_bitreader.Error"), "");
+ llvm_raise(*caml_named_value("Llvm_bitreader.Error"), LLVMCreateMessage(""));
return M;
}
@@ -35,7 +36,7 @@
LLVMModuleRef M;
if (LLVMParseBitcodeInContext2(C, MemBuf, &M))
- llvm_raise(*caml_named_value("Llvm_bitreader.Error"), "");
+ llvm_raise(*caml_named_value("Llvm_bitreader.Error"), LLVMCreateMessage(""));
return M;
}
Index: llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c
===================================================================
--- llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c
+++ llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c
@@ -19,6 +19,7 @@
#include <stdlib.h>
#include <string.h>
#include "llvm-c/Core.h"
+#include "llvm-c/Support.h"
#include "caml/alloc.h"
#include "caml/custom.h"
#include "caml/memory.h"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18675.52335.patch
Type: text/x-patch
Size: 2857 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160401/36c683f0/attachment.bin>
More information about the llvm-commits
mailing list