[all-commits] [llvm/llvm-project] d18a9a: [flang] Make the frontend driver error out when re...
Andrzej WarzyĆski via All-commits
all-commits at lists.llvm.org
Fri Dec 17 02:10:58 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d18a9aeae9e6b7514186188ba71d1d9b6956fe16
https://github.com/llvm/llvm-project/commit/d18a9aeae9e6b7514186188ba71d1d9b6956fe16
Author: Andrzej Warzynski <andrzej.warzynski at arm.com>
Date: 2021-12-17 (Fri, 17 Dec 2021)
Changed paths:
M flang/lib/Frontend/CompilerInvocation.cpp
M flang/test/Driver/debug-measure-parse-tree.f90
M flang/test/Driver/get-definition.f90
A flang/test/Driver/multiple-actions-error.f95
M flang/test/Driver/werror-parse.f
M flang/test/Driver/werror-scan.f
M flang/test/Driver/werror-sema.f90
M flang/test/Frontend/input-output-file.f90
M flang/test/Frontend/multiple-input-files.f90
M flang/test/Lower/pre-fir-tree01.f90
M flang/test/Lower/pre-fir-tree02.f90
M flang/test/Lower/pre-fir-tree03.f90
M flang/test/Lower/pre-fir-tree04.f90
M flang/test/Lower/pre-fir-tree05.f90
M flang/test/Semantics/data09.f90
M flang/test/Semantics/data11.f90
M flang/test/Semantics/data13.f90
M flang/test/Semantics/getdefinition01.f90
M flang/test/Semantics/getdefinition02.f
M flang/test/Semantics/getdefinition03-a.f90
M flang/test/Semantics/getdefinition04.f90
M flang/test/Semantics/getdefinition05.f90
M flang/test/Semantics/getsymbols01.f90
M flang/test/Semantics/getsymbols02.f90
M flang/test/Semantics/getsymbols03-a.f90
M flang/test/Semantics/getsymbols04.f90
M flang/test/Semantics/getsymbols05.f90
M llvm/include/llvm/Option/ArgList.h
Log Message:
-----------
[flang] Make the frontend driver error out when requesting multiple actions
With this change, the following invocations will be treated as errors
(multiple actions are specified):
```
$ flang-new -fc1 -E -fsyntax-only file.95
$ flang-new -fc1 -fsyntax-only -fdebug-dump-symbols file.95
```
In the examples above it is not clear whether it is `-fsyntax-only` or
the other action that is run (i.e. `-E` or `-fdebug-dump-symbols`). It
makes sense to disallow such usage. This should also lead to cleaner and
clearer tests (the `RUN` lines using `%flang_fc1` will only allow one
action).
This change means that `flang-new -fc1` and `clang -cc1` will behave
differently when multiple action options are specified. As frontend
drivers are mostly used by compiler developers, this shouldn't affect or
confuse the compiler end-users. Also, `flang-new` and `clang` remain
consistent.
Tests are updated accordingly. More specifically, I've made sure that
every test specifies only one action. I've also taken the opportunity to
simplify "multiple-input-files.f90" a bit.
Differential Revision: https://reviews.llvm.org/D111781
More information about the All-commits
mailing list