1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

Expose initializing the native target for the execution engine.

llvm-svn: 81800
This commit is contained in:
Erick Tryzelaar 2009-09-14 21:54:32 +00:00
parent 0e2d5db045
commit cd5ce50e17
7 changed files with 20 additions and 2 deletions

View File

@ -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

View File

@ -109,3 +109,6 @@ module ExecutionEngine = struct
*)
end
external initialize_native_target : unit -> bool
= "llvm_initialize_native_target"

View File

@ -161,3 +161,6 @@ module ExecutionEngine: sig
[ee]. *)
val target_data: t -> Llvm_target.TargetData.t
end
external initialize_native_target : unit -> bool
= "llvm_initialize_native_target"

View File

@ -962,6 +962,8 @@ open Llvm_target
open Llvm_scalar_opts
let main () =
ignore (initialize_native_target ());
(* Install standard binary operators.
* 1 is the lowest precedence. *)
Hashtbl.add Parser.binop_precedence '&lt;' 10;

View File

@ -1487,6 +1487,8 @@ open Llvm_target
open Llvm_scalar_opts
let main () =
ignore (initialize_native_target ());
(* Install standard binary operators.
* 1 is the lowest precedence. *)
Hashtbl.add Parser.binop_precedence '&lt;' 10;

View File

@ -1486,6 +1486,8 @@ open Llvm_target
open Llvm_scalar_opts
let main () =
ignore (initialize_native_target ());
(* Install standard binary operators.
* 1 is the lowest precedence. *)
Hashtbl.add Parser.binop_precedence '&lt;' 10;

View File

@ -1816,6 +1816,8 @@ open Llvm_target
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;