[clang] [clang-tools-extra] [lldb] [llvm] [clang][modules] Serialize `CodeGenOptions` (PR #146422)
Jan Svoboda via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 15 11:23:15 PDT 2025
================
@@ -36,13 +36,13 @@ void CodeGenOptions::resetNonModularOptions(StringRef ModuleFormat) {
// emitted into the PCM (-gmodules).
if (ModuleFormat == "raw" && !DebugTypeExtRefs) {
#define DEBUGOPT(Name, Bits, Default, Compatibility) \
- if constexpr (CK::Compatibility == CK::Affecting) \
+ if constexpr (CK::Compatibility != CK::Benign) \
Name = Default;
#define VALUE_DEBUGOPT(Name, Bits, Default, Compatibility) \
- if constexpr (CK::Compatibility == CK::Affecting) \
+ if constexpr (CK::Compatibility == CK::Benign) \
----------------
jansvoboda11 wrote:
Good catch. These should actually all be `!= CK::Benign`. Removing the condition would be fine semantically, but `if constexpr` is more efficient. I don't have a strong preference here, just wanted to keep the original behavior.
https://github.com/llvm/llvm-project/pull/146422
More information about the llvm-commits
mailing list