diff options
author | Andrzej Warzynski <andrzej.warzynski@arm.com> | 2022-04-22 10:59:31 +0000 |
---|---|---|
committer | Andrzej Warzynski <andrzej.warzynski@arm.com> | 2022-04-27 09:20:07 +0000 |
commit | d902dd011c9403ff746613a73c5d83e13db93fe5 (patch) | |
tree | f06adf69e5971b9d63ca383c08a49087a211885c /flang/lib/Frontend/CompilerInvocation.cpp | |
parent | ca3cd345a0d0046ef15e6806494099b017cb1b31 (diff) | |
download | llvm-d902dd011c9403ff746613a73c5d83e13db93fe5.zip llvm-d902dd011c9403ff746613a73c5d83e13db93fe5.tar.gz llvm-d902dd011c9403ff746613a73c5d83e13db93fe5.tar.bz2 |
[flang][driver] NFC: Make code more in line with LLVM style
This patch basically implements [1] in ExecuteCompilerInvocation.cpp. It
also:
* replaces `CreateFrontendBaseAction` with `CreateFrontendAction`
(only one method is needed ATM, this change removes the extra
indirection)
* removes `InvalidAction` from the `ActionKind` enum (I don't think it
adds much and keeping it would mean adding a new void case in
`CreateFrontendAction`)
* sets the default frontend action in FrontendOptions.h to
`ParseSyntaxOnly` (note that this is still overridden independently
in `ParseFrontendArg` in CompilerInvocation.cpp)
No new functionality is added, hence no tests.
[1] https://llvm.org/docs/CodingStandards.html#don-t-use-default-labels-in-fully-covered-switches-over-enumerations
Differential Revision: https://reviews.llvm.org/D124245
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | flang/lib/Frontend/CompilerInvocation.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp index 0f0db57..d56566d 100644 --- a/flang/lib/Frontend/CompilerInvocation.cpp +++ b/flang/lib/Frontend/CompilerInvocation.cpp @@ -98,9 +98,6 @@ static void ParseTargetArgs(TargetOptions &opts, llvm::opt::ArgList &args) { // Tweak the frontend configuration based on the frontend action static void setUpFrontendBasedOnAction(FrontendOptions &opts) { - assert(opts.programAction != Fortran::frontend::InvalidAction && - "Fortran frontend action not set!"); - if (opts.programAction == DebugDumpParsingLog) opts.instrumentedParse = true; |