output.ml 326 B

123456789101112131415
  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. Print.print_assembly stdout instrs
  12. end;
  13. Empty
  14. | _ -> raise InvalidInput