[all-commits] [llvm/llvm-project] 96d229: [flang][driver] Add options for unparsing
Andrzej WarzyĆski via All-commits
all-commits at lists.llvm.org
Tue Feb 16 01:33:24 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 96d229c9abdfb2836e18a554bfb63b5d52aeebfa
https://github.com/llvm/llvm-project/commit/96d229c9abdfb2836e18a554bfb63b5d52aeebfa
Author: Andrzej Warzynski <andrzej.warzynski at arm.com>
Date: 2021-02-16 (Tue, 16 Feb 2021)
Changed paths:
M clang/include/clang/Driver/Options.td
M flang/include/flang/Frontend/FrontendActions.h
M flang/include/flang/Frontend/FrontendOptions.h
M flang/lib/Frontend/CMakeLists.txt
M flang/lib/Frontend/CompilerInvocation.cpp
M flang/lib/Frontend/FrontendActions.cpp
M flang/lib/Frontend/FrontendOptions.cpp
M flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
M flang/lib/Parser/CMakeLists.txt
M flang/test/Flang-Driver/driver-help.f90
M flang/test/Parser/continuation-in-if.f
M flang/test/Parser/pp-dir-comments.f90
M flang/test/Semantics/canondo01.f90
M flang/test/Semantics/canondo02.f90
M flang/test/Semantics/canondo03.f90
M flang/test/Semantics/canondo04.f90
M flang/test/Semantics/canondo05.f90
M flang/test/Semantics/critical04.f90
M flang/test/Semantics/defined-ops.f90
M flang/test/Semantics/doconcurrent02.f90
M flang/test/Semantics/doconcurrent03.f90
M flang/test/Semantics/doconcurrent04.f90
M flang/test/Semantics/doconcurrent07.f90
M flang/test/Semantics/label02.f90
M flang/test/Semantics/label03.f90
M flang/test/Semantics/label04.f90
M flang/test/Semantics/label05.f90
M flang/test/Semantics/label06.f90
M flang/test/Semantics/label07.f90
M flang/test/Semantics/label08.f90
M flang/test/Semantics/label09.f90
M flang/test/Semantics/label10.f90
M flang/test/Semantics/label12.f90
M flang/test/Semantics/label13.f90
M flang/test/Semantics/label15.f90
M flang/test/lit.cfg.py
M flang/tools/f18/f18.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list