Expose initializing the native target for the execution engine.
[oota-llvm.git] / docs / tutorial / OCamlLangImpl6.html
index 8c6996f20573dfd6306aecd5c8377705ad15edfe..2edb22edf632acc03d34594e987c561bb3183b00 100644 (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 '<' 10;
@@ -1518,6 +1520,8 @@ let main () =
   (* Simplify the control flow graph (deleting unreachable blocks, etc). *)
   add_cfg_simplification the_fpm;
 
+  ignore (PassManager.initialize the_fpm);
+
   (* Run the main "interpreter loop" now. *)
   Toplevel.main_loop the_fpm the_execution_engine stream;