Make sure to initialize the fpm in the ocaml tutorial.
[oota-llvm.git] / docs / tutorial / OCamlLangImpl4.html
index ec3c20bc6bfac6d08671ce25ffe8751dfcead110..7cd54d9beafd505f2bd39666c4aaa0b613249dd6 100644 (file)
@@ -206,6 +206,8 @@ add a set of optimizations to run.  The code looks like this:</p>
   (* 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;
 </pre>
@@ -992,6 +994,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;