mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-20 20:03:44 +00:00
compiler/options.m:
Add two new options.
The new bool option --output-optimization-options asks the compiler
to output a list of all optimization levels, with their descriptions
and associated lists of options.
The new int option --output-optimization-options-upto=N does the same job
up to and including -ON.
compiler/op_mode.m:
Add a new op_mode for that corresponds to these options.
compiler/mercury_compile_main.m:
Given the new op_mode, call the new code in print_help.m.
compiler/print_help.m:
Implement the new op_mode.
tools/make_optimization_options_end:
Delete the "Optimization level N:" part of each level's description,
to allow print_help.m to use that text as a heading.
compiler/handle_options.m:
compiler/optimization_options.m:
Conform to the changes above.
tests/warnings/help_opt_levels.m:
tests/warnings/help_text.m:
New test cases for "mmc --output-optimization-options-upto=N",
and for "mmc --help-alt" respectively. Their code does not matter,
because the compiler never looks at them; they are only a vehicle
to hang tests of help text on.
tests/warnings/Mmakefile:
Invoke the two new tests with their intended options.
tests/warnings/help_opt_levels.err_exp:
tests/warnings/help_text.err_exp:
The expected outputs of those two invocations.
22 lines
659 B
Mathematica
22 lines
659 B
Mathematica
%---------------------------------------------------------------------------%
|
|
% vim: ts=4 sw=4 et ft=mercury
|
|
%---------------------------------------------------------------------------%
|
|
% The code of this module is immaterial; what this test case tests
|
|
% is the operation of the --help option.
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- module help_text.
|
|
:- interface.
|
|
|
|
:- import_module io.
|
|
|
|
:- pred main(io::di, io::uo) is det.
|
|
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- implementation.
|
|
|
|
main(!IO).
|
|
|
|
%---------------------------------------------------------------------------%
|