[flang][driver] Add support for the "-init-only" option
authorStuart Ellis <stuart.ellis@arm.com>
Mon, 7 Jun 2021 14:40:26 +0000 (15:40 +0100)
committerAndrzej Warzynski <andrzej.warzynski@arm.com>
Mon, 7 Jun 2021 14:40:26 +0000 (15:40 +0100)
commite1da3297d253b33be1ff941cf9ed9091dd332ea5
treee1564805788885b5a6e4c32d72ea34ee941ba6d9
parentae3f6de3a856006601cbca81ebf9780a2534bdcc
[flang][driver] Add support for the "-init-only" option

Adding the `-init-only` option and corresponding frontend action to
generate a diagnostic.

`-init-only` vs `-test-io`:
`-init-only` ignores the input (it never calls the prescanner)
`-test-io` is similar to `-init-only`, but does read and print the input
without calling the prescanner.

This patch also adds a Driver test to check this action.

Reviewed By: awarzynski, AMDChirag

Differential Revision: https://reviews.llvm.org/D102849
clang/include/clang/Driver/Options.td
flang/include/flang/Frontend/FrontendActions.h
flang/include/flang/Frontend/FrontendOptions.h
flang/lib/Frontend/CompilerInvocation.cpp
flang/lib/Frontend/FrontendActions.cpp
flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
flang/test/Driver/driver-help.f90
flang/test/Driver/init-only.f90 [new file with mode: 0644]