llvm-project/flang/test/Parser
Andrzej Warzynski 96d229c9ab [flang][driver] Add options for unparsing
This patch adds the following compiler frontend driver options:
  * -fdebug-unparse (f18 spelling: -funparse)
  * -fdebug-unparse-with-symbols (f18 spelling: -funparse-with-symbols)
The new driver will only accept the new spelling. `f18` will accept both
the original and the new spelling.

A new base class for frontend actions is added: `PrescanAndSemaAction`.
This is added to reduce code duplication that otherwise these new
options would lead to. Implementation from
  * `ParseSyntaxOnlyAction::ExecutionAction`
is moved to:
  * `PrescanAndSemaAction::BeginSourceFileAction`
This implementation is now shared between:
  * PrescanAndSemaAction
  * ParseSyntaxOnlyAction
  * DebugUnparseAction
  * DebugUnparseWithSymbolsAction

All tests that don't require other yet unimplemented options are
updated. This way `flang-new -fc1` is used instead of `f18` when
`FLANG_BUILD_NEW_DRIVER` is set to `On`. In order to facilitate this,
`%flang_fc1` is added in the LIT configuration (lit.cfg.py).

`asFortran` from f18.cpp is duplicated as `getBasicAsFortran` in
FrontendOptions.cpp. At this stage it's hard to find a good place to
share this method. I suggest that we revisit this once a switch from
`f18` to `flang-new` is complete.

Differential Revision: https://reviews.llvm.org/D96483
2021-02-16 09:32:51 +00:00
..
acc-unparse.f90 [flang][openacc] Fix unparsing of combined construct (bug 47659) 2020-10-01 10:35:06 -04:00
badlabel.f
compiler-directives.f90 [flang] Allow "name: value" in compiler directives 2020-10-08 10:01:37 -07:00
continuation-in-if.f [flang][driver] Add options for unparsing 2021-02-16 09:32:51 +00:00
omp-allocate-unparse.f90 [flang]Add Parser Support for Allocate Directive 2020-12-10 16:21:19 +00:00
omp-atomic-unparse.f90 [Flang][OpenMP] Rework parser changes for OpenMP atomic construct. 2020-10-14 14:19:49 +05:30
pp-dir-comments.f90 [flang][driver] Add options for unparsing 2021-02-16 09:32:51 +00:00