llvm-project/flang/test
Andrzej Warzynski 55a9615599 [flang][driver] Refactor boolean options
For boolean options, e.g. `-fxor-operator`/`-fno-xor-operator`, we ought
to be using TableGen multi-classes. This way, we only have to write one
definition to have both forms auto-generated. This patch refactors all
of Flang's boolean options to use two new multi-classes:
`OptInFC1FFOption` and `OptOutFC1FFOption`. These multi-classes are
based on `OptInFFOption`/`OptOutFFOption`, respectively. I've also
simplified the processing of the updated options in
CompilerInvocation.cpp.

With the new approach, "empty" help text (i.e. no `HelpText`) is now
replaced with an empty string (i.e. HelpText<"">). When running
flang-new --help, that's considered as non-empty help messages, which is
then printed (that's controlled by `printHelp` from
llvm/lib/Option/OptTable.cpp). This means that with this patch,
flang-new --help will start printing e.g. -fno-backslash, even though
there is no actual help text to print for this option (apart from the
empty string ""). Tests are updated accordingly.

Note that with this patch, both `-fxor-operator` and `-fno-xor-operator`
(and other boolean options refactored here) remain available in
`flang-new` and `flang-new -fc1`. In this respect, nothing changes. In a
forthcoming patch, I will refine this so that `flang-new -fc1` only
accepts `-ffoo` (`OptInFC1FFOption`) or `-fno-foo` (`OptOutCC1FFOption`).

For clarity, `OptInFFOption`/`OptOutFFOption` are renamed as
`OptInCC1FFOption`/`OptOutCC1FFOption`, respectively. Otherwise, this is
an NFC from Clang's perspective.

Differential Revision: https://reviews.llvm.org/D105881
2021-08-05 10:20:47 +00:00
..
Driver [flang][driver] Refactor boolean options 2021-08-05 10:20:47 +00:00
Evaluate [flang] Fold more reduction intrinsic function calls 2021-06-21 10:13:59 -07:00
Fir [mlir] Set the namespace of the BuiltinDialect to 'builtin' 2021-07-28 21:00:10 +00:00
Frontend [flang][driver] Remove `%flang-new` from the LIT configuration 2021-04-13 10:55:01 +00:00
Lower [flang] Update the regression tests to use the new driver when enabled 2021-04-15 08:52:23 +00:00
NonGtestUnit [flang] Run non-gtest unit tests with lit. 2020-07-24 14:49:39 +01:00
Parser [flang] Produce proper "preprocessor output" for -E option 2021-07-30 15:13:56 -07:00
Preprocessing [flang][nfc] Add a regression test for #50993 2021-08-02 18:21:23 +00:00
Runtime [flang] Check there's no dependency on C++ libs. NFC 2021-06-16 11:38:25 +00:00
Semantics [flang] Support DFLOAT legacy extension intrinsic function 2021-08-04 12:18:41 -07:00
Unit [flang] unit test support for out-of-tree and in-tree using google tests framework 2020-06-15 22:09:56 +05:30
CMakeLists.txt [flang][nfc] Simplify CMake 2021-07-12 17:11:33 +00:00
lit.cfg.py [flang] Check there's no dependency on C++ libs. NFC 2021-06-16 11:38:25 +00:00
lit.site.cfg.py.in [flang] Check there's no dependency on C++ libs. NFC 2021-06-16 11:38:25 +00:00