[all-commits] [llvm/llvm-project] d30940: [Option] Add BoolOrDefault for OptionalBoolField a...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Sat Oct 3 23:58:05 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d30940d9dc3690bc8433411ce9b1e9eca45f9e62
https://github.com/llvm/llvm-project/commit/d30940d9dc3690bc8433411ce9b1e9eca45f9e62
Author: Fangrui Song <i at maskray.me>
Date: 2026-10-03 (Sat, 03 Oct 2026)
Changed paths:
M llvm/docs/CommandLine.md
A llvm/include/llvm/ADT/BoolOrDefault.h
M llvm/include/llvm/Option/LibraryOptions.h
M llvm/include/llvm/Option/LibraryOptions.td
M llvm/lib/MC/MCAsmInfo.cpp
M llvm/lib/MC/MCAsmInfoXCOFF.cpp
M llvm/unittests/Option/LibraryOptionsTest.cpp
M llvm/utils/TableGen/Basic/OptionParserEmitter.cpp
Log Message:
-----------
[Option] Add BoolOrDefault for OptionalBoolField and DefaultOnOffField (#228835)
The members of OptionalBoolField and DefaultOnOffField are
std::optional<bool>, on which `if (X)` tests whether the option is
given, not its value. Make them a new 1-byte `enum class BoolOrDefault :
uint8_t { Default, True, False }`, which does not convert to bool, and
read them with `valueOr(X, Default)`.
Aided by Opus 5.5
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list