output.ml 387 B

12345678910111213141516
  1. open Types
  2. open Util
  3. let phase = function
  4. | Assembly instrs ->
  5. begin match Globals.args.outfile with
  6. | Some filename ->
  7. let oc = open_out filename in
  8. Print.print_assembly oc instrs;
  9. close_out oc
  10. | None ->
  11. if Globals.args.verbose >= 1 then prerr_endline hline;
  12. Print.print_assembly stdout instrs
  13. end;
  14. Empty
  15. | _ -> raise InvalidInput