[llvm-branch-commits] [llvm-branch] r81975 - in /llvm/branches/release_26: bindings/ocaml/executionengine/executionengine_ocaml.c bindings/ocaml/executionengine/llvm_executionengine.ml bindings/ocaml/executionengine/llvm_executionengine.mli docs/tutorial/OCamlLangImpl4.html docs/tutorial/OCamlLangImpl5.html docs/tutorial/OCamlLangImpl6.html docs/tutorial/OCamlLangImpl7.html
Tanya Lattner
tonic at nondot.org
Tue Sep 15 18:06:50 PDT 2009
Author: tbrethou
Date: Tue Sep 15 20:06:50 2009
New Revision: 81975
URL: http://llvm.org/viewvc/llvm-project?rev=81975&view=rev
Log:
Merge 81800 from mainline.
Expose initializing the native target for the execution engine.
Modified:
llvm/branches/release_26/bindings/ocaml/executionengine/executionengine_ocaml.c
llvm/branches/release_26/bindings/ocaml/executionengine/llvm_executionengine.ml
llvm/branches/release_26/bindings/ocaml/executionengine/llvm_executionengine.mli
llvm/branches/release_26/docs/tutorial/OCamlLangImpl4.html
llvm/branches/release_26/docs/tutorial/OCamlLangImpl5.html
llvm/branches/release_26/docs/tutorial/OCamlLangImpl6.html
llvm/branches/release_26/docs/tutorial/OCamlLangImpl7.html
Modified: llvm/branches/release_26/bindings/ocaml/executionengine/executionengine_ocaml.c
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_26/bindings/ocaml/executionengine/executionengine_ocaml.c?rev=81975&r1=81974&r2=81975&view=diff
==============================================================================
--- llvm/branches/release_26/bindings/ocaml/executionengine/executionengine_ocaml.c (original)
+++ llvm/branches/release_26/bindings/ocaml/executionengine/executionengine_ocaml.c Tue Sep 15 20:06:50 2009
@@ -24,11 +24,15 @@
#include <string.h>
#include <assert.h>
-/* Force the LLVM interpreter, JIT, and native target to be linked in. */
+/* Force the LLVM interpreter and JIT to be linked in. */
void llvm_initialize(void) {
LLVMLinkInInterpreter();
LLVMLinkInJIT();
- LLVMInitializeNativeTarget();
+}
+
+/* unit -> bool */
+CAMLprim value llvm_initialize_native_target(value Unit) {
+ return Val_bool(LLVMInitializeNativeTarget());
}
/* Can't use the recommended caml_named_value mechanism for backwards
Modified: llvm/branches/release_26/bindings/ocaml/executionengine/llvm_executionengine.ml
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_26/bindings/ocaml/executionengine/llvm_executionengine.ml?rev=81975&r1=81974&r2=81975&view=diff
==============================================================================
--- llvm/branches/release_26/bindings/ocaml/executionengine/llvm_executionengine.ml (original)
+++ llvm/branches/release_26/bindings/ocaml/executionengine/llvm_executionengine.ml Tue Sep 15 20:06:50 2009
@@ -109,3 +109,6 @@
*)
end
+
+external initialize_native_target : unit -> bool
+ = "llvm_initialize_native_target"
Modified: llvm/branches/release_26/bindings/ocaml/executionengine/llvm_executionengine.mli
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_26/bindings/ocaml/executionengine/llvm_executionengine.mli?rev=81975&r1=81974&r2=81975&view=diff
==============================================================================
--- llvm/branches/release_26/bindings/ocaml/executionengine/llvm_executionengine.mli (original)
+++ llvm/branches/release_26/bindings/ocaml/executionengine/llvm_executionengine.mli Tue Sep 15 20:06:50 2009
@@ -161,3 +161,6 @@
[ee]. *)
val target_data: t -> Llvm_target.TargetData.t
end
+
+external initialize_native_target : unit -> bool
+ = "llvm_initialize_native_target"
Modified: llvm/branches/release_26/docs/tutorial/OCamlLangImpl4.html
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_26/docs/tutorial/OCamlLangImpl4.html?rev=81975&r1=81974&r2=81975&view=diff
==============================================================================
--- llvm/branches/release_26/docs/tutorial/OCamlLangImpl4.html (original)
+++ llvm/branches/release_26/docs/tutorial/OCamlLangImpl4.html Tue Sep 15 20:06:50 2009
@@ -962,6 +962,8 @@
open Llvm_scalar_opts
let main () =
+ ignore (initialize_native_target ());
+
(* Install standard binary operators.
* 1 is the lowest precedence. *)
Hashtbl.add Parser.binop_precedence '<' 10;
Modified: llvm/branches/release_26/docs/tutorial/OCamlLangImpl5.html
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_26/docs/tutorial/OCamlLangImpl5.html?rev=81975&r1=81974&r2=81975&view=diff
==============================================================================
--- llvm/branches/release_26/docs/tutorial/OCamlLangImpl5.html (original)
+++ llvm/branches/release_26/docs/tutorial/OCamlLangImpl5.html Tue Sep 15 20:06:50 2009
@@ -1487,6 +1487,8 @@
open Llvm_scalar_opts
let main () =
+ ignore (initialize_native_target ());
+
(* Install standard binary operators.
* 1 is the lowest precedence. *)
Hashtbl.add Parser.binop_precedence '<' 10;
Modified: llvm/branches/release_26/docs/tutorial/OCamlLangImpl6.html
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_26/docs/tutorial/OCamlLangImpl6.html?rev=81975&r1=81974&r2=81975&view=diff
==============================================================================
--- llvm/branches/release_26/docs/tutorial/OCamlLangImpl6.html (original)
+++ llvm/branches/release_26/docs/tutorial/OCamlLangImpl6.html Tue Sep 15 20:06:50 2009
@@ -1486,6 +1486,8 @@
open Llvm_scalar_opts
let main () =
+ ignore (initialize_native_target ());
+
(* Install standard binary operators.
* 1 is the lowest precedence. *)
Hashtbl.add Parser.binop_precedence '<' 10;
Modified: llvm/branches/release_26/docs/tutorial/OCamlLangImpl7.html
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_26/docs/tutorial/OCamlLangImpl7.html?rev=81975&r1=81974&r2=81975&view=diff
==============================================================================
--- llvm/branches/release_26/docs/tutorial/OCamlLangImpl7.html (original)
+++ llvm/branches/release_26/docs/tutorial/OCamlLangImpl7.html Tue Sep 15 20:06:50 2009
@@ -1816,6 +1816,8 @@
open Llvm_scalar_opts
let main () =
+ ignore (initialize_native_target ());
+
(* Install standard binary operators.
* 1 is the lowest precedence. *)
Hashtbl.add Parser.binop_precedence '=' 2;
More information about the llvm-branch-commits
mailing list