diff options
author | Stuart Ellis <stuart.ellis@arm.com> | 2021-06-07 15:40:26 +0100 |
---|---|---|
committer | Andrzej Warzynski <andrzej.warzynski@arm.com> | 2021-06-07 15:40:26 +0100 |
commit | e1da3297d253b33be1ff941cf9ed9091dd332ea5 (patch) | |
tree | e1564805788885b5a6e4c32d72ea34ee941ba6d9 /flang/lib/FrontendTool | |
parent | ae3f6de3a856006601cbca81ebf9780a2534bdcc (diff) | |
download | llvm-e1da3297d253b33be1ff941cf9ed9091dd332ea5.zip llvm-e1da3297d253b33be1ff941cf9ed9091dd332ea5.tar.gz llvm-e1da3297d253b33be1ff941cf9ed9091dd332ea5.tar.bz2 |
[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
Diffstat (limited to 'flang/lib/FrontendTool')
-rw-r--r-- | flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp index 93bbf4f..ffc0d75 100644 --- a/flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -73,6 +73,9 @@ static std::unique_ptr<FrontendAction> CreateFrontendBaseAction( case GetSymbolsSources: return std::make_unique<GetSymbolsSourcesAction>(); break; + case InitOnly: + return std::make_unique<InitOnlyAction>(); + break; default: break; // TODO: |