Skip to content

Commit fef1854

Browse files
authored
[clang][modules] Reset codegen options. (#74006)
CodeGen options do not affect the AST, so they usually can be ignored. The only exception to the rule is when a PCM is created with `-gmodules`. In that case the Clang module format is switched to object file container and contains also serialized debug information that can be affected by debug options. There the following approach was choosen: 1.) Split out all the debug options into a separate `DebugOptions.def` file. The file is included by `CodeGenOptions.def`, so the change is transparent to all existing users of `CodeGenOptions.def`. 2.) Reset all CodeGen options, but excluding affecting debug options. 3.) Conditionally reset debug options that can affect the PCM. This fixes rdar://113135909.
1 parent 78940a4 commit fef1854

File tree

7 files changed

+260
-85
lines changed

7 files changed

+260
-85
lines changed

clang/include/clang/Basic/CodeGenOptions.def

Lines changed: 3 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,8 @@ CODEGENOPT(Name, Bits, Default)
2828
#endif
2929

3030
CODEGENOPT(DisableIntegratedAS, 1, 0) ///< -no-integrated-as
31-
ENUM_CODEGENOPT(CompressDebugSections, llvm::DebugCompressionType, 2,
32-
llvm::DebugCompressionType::None)
3331
CODEGENOPT(RelaxELFRelocations, 1, 1) ///< -Wa,-mrelax-relocations={yes,no}
3432
CODEGENOPT(AsmVerbose , 1, 0) ///< -dA, -fverbose-asm.
35-
CODEGENOPT(Dwarf64 , 1, 0) ///< -gdwarf64.
36-
CODEGENOPT(Dwarf32 , 1, 1) ///< -gdwarf32.
3733
CODEGENOPT(PreserveAsmComments, 1, 1) ///< -dA, -fno-preserve-as-comments.
3834
CODEGENOPT(AssumeSaneOperatorNew , 1, 1) ///< implicit __attribute__((malloc)) operator new
3935
CODEGENOPT(AssumeUniqueVTables , 1, 1) ///< Assume a class has only one vtable.
@@ -73,10 +69,6 @@ CODEGENOPT(DebugPassManager, 1, 0) ///< Prints debug information for the new
7369
CODEGENOPT(DisableRedZone , 1, 0) ///< Set when -mno-red-zone is enabled.
7470
CODEGENOPT(EmitCallSiteInfo, 1, 0) ///< Emit call site info only in the case of
7571
///< '-g' + 'O>0' level.
76-
CODEGENOPT(EnableDIPreservationVerify, 1, 0) ///< Enable di preservation verify
77-
///< each (it means check
78-
///< the original debug info
79-
///< metadata preservation).
8072
CODEGENOPT(IndirectTlsSegRefs, 1, 0) ///< Set when -mno-tls-direct-seg-refs
8173
///< is specified.
8274
CODEGENOPT(DisableTailCalls , 1, 0) ///< Do not emit tail calls.
@@ -113,16 +105,10 @@ CODEGENOPT(IndirectBranchCSPrefix, 1, 0) ///< if -mindirect-branch-cs-prefix
113105
CODEGENOPT(XRayInstrumentFunctions , 1, 0) ///< Set when -fxray-instrument is
114106
///< enabled.
115107
CODEGENOPT(StackSizeSection , 1, 0) ///< Set when -fstack-size-section is enabled.
116-
CODEGENOPT(ForceDwarfFrameSection , 1, 0) ///< Set when -fforce-dwarf-frame is
117-
///< enabled.
118108

119109
///< Set when -femit-compact-unwind-non-canonical is enabled.
120110
CODEGENOPT(EmitCompactUnwindNonCanonical, 1, 0)
121111

122-
///< Set when -femit-dwarf-unwind is passed.
123-
ENUM_CODEGENOPT(EmitDwarfUnwind, llvm::EmitDwarfUnwindType, 2,
124-
llvm::EmitDwarfUnwindType::Default)
125-
126112
///< Set when -fxray-always-emit-customevents is enabled.
127113
CODEGENOPT(XRayAlwaysEmitCustomEvents , 1, 0)
128114

@@ -178,17 +164,13 @@ CODEGENOPT(IncrementalLinkerCompatible, 1, 0) ///< Emit an object file which can
178164
CODEGENOPT(MergeAllConstants , 1, 1) ///< Merge identical constants.
179165
CODEGENOPT(MergeFunctions , 1, 0) ///< Set when -fmerge-functions is enabled.
180166
CODEGENOPT(NoCommon , 1, 0) ///< Set when -fno-common or C++ is enabled.
181-
CODEGENOPT(NoDwarfDirectoryAsm , 1, 0) ///< Set when -fno-dwarf-directory-asm is
182-
///< enabled.
183167
CODEGENOPT(NoExecStack , 1, 0) ///< Set when -Wa,--noexecstack is enabled.
184168
CODEGENOPT(FatalWarnings , 1, 0) ///< Set when -Wa,--fatal-warnings is
185169
///< enabled.
186170
CODEGENOPT(NoWarn , 1, 0) ///< Set when -Wa,--no-warn is enabled.
187171
CODEGENOPT(NoTypeCheck , 1, 0) ///< Set when -Wa,--no-type-check is enabled.
188172
CODEGENOPT(MisExpect , 1, 0) ///< Set when -Wmisexpect is enabled
189173
CODEGENOPT(EnableSegmentedStacks , 1, 0) ///< Set when -fsplit-stack is enabled.
190-
CODEGENOPT(NoInlineLineTables, 1, 0) ///< Whether debug info should contain
191-
///< inline line tables.
192174
CODEGENOPT(StackClashProtector, 1, 0) ///< Set when -fstack-clash-protection is enabled.
193175
CODEGENOPT(NoImplicitFloat , 1, 0) ///< Set when -mno-implicit-float is enabled.
194176
CODEGENOPT(NullPointerIsValid , 1, 0) ///< Assume Null pointer deference is defined.
@@ -341,37 +323,6 @@ VALUE_CODEGENOPT(StackProbeSize , 32, 4096) ///< Overrides default stack
341323
///< probe size, even if 0.
342324
VALUE_CODEGENOPT(WarnStackSize , 32, UINT_MAX) ///< Set via -fwarn-stack-size.
343325
CODEGENOPT(NoStackArgProbe, 1, 0) ///< Set when -mno-stack-arg-probe is used
344-
CODEGENOPT(DebugStrictDwarf, 1, 1) ///< Whether or not to use strict DWARF info.
345-
346-
/// Control the Assignment Tracking debug info feature.
347-
ENUM_CODEGENOPT(AssignmentTrackingMode, AssignmentTrackingOpts, 2, AssignmentTrackingOpts::Disabled)
348-
349-
CODEGENOPT(DebugColumnInfo, 1, 0) ///< Whether or not to use column information
350-
///< in debug info.
351-
352-
CODEGENOPT(DebugTypeExtRefs, 1, 0) ///< Whether or not debug info should contain
353-
///< external references to a PCH or module.
354-
355-
CODEGENOPT(DebugExplicitImport, 1, 0) ///< Whether or not debug info should
356-
///< contain explicit imports for
357-
///< anonymous namespaces
358-
359-
/// Set debug info source file hashing algorithm.
360-
ENUM_CODEGENOPT(DebugSrcHash, DebugSrcHashKind, 2, DSH_MD5)
361-
362-
CODEGENOPT(SplitDwarfInlining, 1, 1) ///< Whether to include inlining info in the
363-
///< skeleton CU to allow for symbolication
364-
///< of inline stack frames without .dwo files.
365-
CODEGENOPT(DebugFwdTemplateParams, 1, 0) ///< Whether to emit complete
366-
///< template parameter descriptions in
367-
///< forward declarations (versus just
368-
///< including them in the name).
369-
ENUM_CODEGENOPT(DebugSimpleTemplateNames, llvm::codegenoptions::DebugTemplateNamesKind, 2, llvm::codegenoptions::DebugTemplateNamesKind::Full) ///< Whether to emit template parameters
370-
///< in the textual names of template
371-
///< specializations.
372-
///< Implies DebugFwdTemplateNames to
373-
///< allow decorated names to be
374-
///< reconstructed when needed.
375326
CODEGENOPT(EmitLLVMUseLists, 1, 0) ///< Control whether to serialize use-lists.
376327

377328
CODEGENOPT(WholeProgramVTables, 1, 0) ///< Whether to apply whole-program
@@ -395,30 +346,6 @@ VALUE_CODEGENOPT(SmallDataLimit, 32, 0)
395346
/// The lower bound for a buffer to be considered for stack protection.
396347
VALUE_CODEGENOPT(SSPBufferSize, 32, 0)
397348

398-
/// The kind of generated debug info.
399-
ENUM_CODEGENOPT(DebugInfo, llvm::codegenoptions::DebugInfoKind, 4, llvm::codegenoptions::NoDebugInfo)
400-
401-
/// Whether to generate macro debug info.
402-
CODEGENOPT(MacroDebugInfo, 1, 0)
403-
404-
/// Tune the debug info for this debugger.
405-
ENUM_CODEGENOPT(DebuggerTuning, llvm::DebuggerKind, 3,
406-
llvm::DebuggerKind::Default)
407-
408-
/// Dwarf version. Version zero indicates to LLVM that no DWARF should be
409-
/// emitted.
410-
VALUE_CODEGENOPT(DwarfVersion, 3, 0)
411-
412-
/// Whether we should emit CodeView debug information. It's possible to emit
413-
/// CodeView and DWARF into the same object.
414-
CODEGENOPT(EmitCodeView, 1, 0)
415-
416-
/// Whether to emit the .debug$H section containing hashes of CodeView types.
417-
CODEGENOPT(CodeViewGHash, 1, 0)
418-
419-
/// Whether to emit the compiler path and command line into the CodeView debug information.
420-
CODEGENOPT(CodeViewCommandLine, 1, 0)
421-
422349
/// The kind of inlining to perform.
423350
ENUM_CODEGENOPT(Inlining, InliningMethod, 2, NormalInlining)
424351

@@ -451,26 +378,14 @@ CODEGENOPT(DirectAccessExternalData, 1, 0)
451378
/// paths that reach the end of a function without executing a required return.
452379
CODEGENOPT(StrictReturn, 1, 1)
453380

454-
/// Whether emit extra debug info for sample pgo profile collection.
455-
CODEGENOPT(DebugInfoForProfiling, 1, 0)
456-
457381
/// Whether emit pseudo probes for sample pgo profile collection.
458382
CODEGENOPT(PseudoProbeForProfiling, 1, 0)
459383

460384
/// Whether 3-component vector type is preserved.
461385
CODEGENOPT(PreserveVec3Type, 1, 0)
462386

463-
/// Whether to emit .debug_gnu_pubnames section instead of .debug_pubnames.
464-
CODEGENOPT(DebugNameTable, 2, 0)
465-
466-
/// Whether to use DWARF base address specifiers in .debug_ranges.
467-
CODEGENOPT(DebugRangesBaseAddress, 1, 0)
468-
469387
CODEGENOPT(NoPLT, 1, 0)
470388

471-
/// Whether to embed source in DWARF debug line section.
472-
CODEGENOPT(EmbedSource, 1, 0)
473-
474389
/// Whether to emit all vtables
475390
CODEGENOPT(ForceEmitVTables, 1, 0)
476391

@@ -515,6 +430,9 @@ ENUM_CODEGENOPT(ZeroCallUsedRegs, llvm::ZeroCallUsedRegs::ZeroCallUsedRegsKind,
515430
/// non-deleting destructors. (No effect on Microsoft ABI.)
516431
CODEGENOPT(CtorDtorReturnThis, 1, 0)
517432

433+
/// FIXME: Make DebugOptions its own top-level .def file.
434+
#include "DebugOptions.def"
435+
518436
#undef CODEGENOPT
519437
#undef ENUM_CODEGENOPT
520438
#undef VALUE_CODEGENOPT

clang/include/clang/Basic/CodeGenOptions.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,10 @@ class CodeGenOptions : public CodeGenOptionsBase {
530530
return SanitizeBinaryMetadataCovered || SanitizeBinaryMetadataAtomics ||
531531
SanitizeBinaryMetadataUAR;
532532
}
533+
534+
/// Reset all of the options that are not considered when building a
535+
/// module.
536+
void resetNonModularOptions(StringRef ModuleFormat);
533537
};
534538

535539
} // end namespace clang
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
//===--- DebugOptions.def - Debug option database ----------------- C++ -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
//
9+
// This file defines debug-specific codegen options. Users of this file
10+
// must define the CODEGENOPT macro to make use of this information.
11+
// Optionally, the user may also define DEBUGOPT (for flags), ENUM_DEBUGOPT (for
12+
// options that have enumeration type), and VALUE_DEBUGOPT (is a debug option
13+
// that describes a value rather than a flag).
14+
//
15+
// BENIGN_ variants of the macros are used to describe options that do not
16+
// affect the generated PCM.
17+
//
18+
//===----------------------------------------------------------------------===//
19+
#ifndef DEBUGOPT
20+
#define DEBUGOPT(Name, Bits, Default) \
21+
CODEGENOPT(Name, Bits, Default)
22+
#endif
23+
24+
#ifndef VALUE_DEBUGOPT
25+
# define VALUE_DEBUGOPT(Name, Bits, Default) \
26+
VALUE_CODEGENOPT(Name, Bits, Default)
27+
#endif
28+
29+
#ifndef ENUM_DEBUGOPT
30+
# define ENUM_DEBUGOPT(Name, Type, Bits, Default) \
31+
ENUM_CODEGENOPT(Name, Type, Bits, Default)
32+
#endif
33+
34+
#ifndef BENIGN_DEBUGOPT
35+
#define BENIGN_DEBUGOPT(Name, Bits, Default) \
36+
DEBUGOPT(Name, Bits, Default)
37+
#endif
38+
39+
#ifndef BENIGN_VALUE_DEBUGOPT
40+
# define BENIGN_VALUE_DEBUGOPT(Name, Bits, Default) \
41+
VALUE_DEBUGOPT(Name, Bits, Default)
42+
#endif
43+
44+
#ifndef BENIGN_ENUM_DEBUGOPT
45+
# define BENIGN_ENUM_DEBUGOPT(Name, Type, Bits, Default) \
46+
ENUM_DEBUGOPT(Name, Type, Bits, Default)
47+
#endif
48+
49+
BENIGN_ENUM_DEBUGOPT(CompressDebugSections, llvm::DebugCompressionType, 2,
50+
llvm::DebugCompressionType::None)
51+
DEBUGOPT(Dwarf64, 1, 0) ///< -gdwarf64.
52+
BENIGN_DEBUGOPT(EnableDIPreservationVerify, 1, 0) ///< Enable di preservation
53+
///< verify each (it means
54+
///< check the original debug
55+
///< info metadata
56+
///< preservation).
57+
BENIGN_DEBUGOPT(ForceDwarfFrameSection , 1, 0) ///< Set when -fforce-dwarf-frame
58+
///< is enabled.
59+
60+
///< Set when -femit-dwarf-unwind is passed.
61+
BENIGN_ENUM_DEBUGOPT(EmitDwarfUnwind, llvm::EmitDwarfUnwindType, 2,
62+
llvm::EmitDwarfUnwindType::Default)
63+
64+
BENIGN_DEBUGOPT(NoDwarfDirectoryAsm , 1, 0) ///< Set when -fno-dwarf-directory-asm
65+
///< is enabled.
66+
67+
BENIGN_DEBUGOPT(NoInlineLineTables, 1, 0) ///< Whether debug info should contain
68+
///< inline line tables.
69+
70+
DEBUGOPT(DebugStrictDwarf, 1, 1) ///< Whether or not to use strict DWARF info.
71+
72+
/// Control the Assignment Tracking debug info feature.
73+
BENIGN_ENUM_DEBUGOPT(AssignmentTrackingMode, AssignmentTrackingOpts, 2,
74+
AssignmentTrackingOpts::Disabled)
75+
76+
DEBUGOPT(DebugColumnInfo, 1, 0) ///< Whether or not to use column information
77+
///< in debug info.
78+
79+
DEBUGOPT(DebugTypeExtRefs, 1, 0) ///< Whether or not debug info should contain
80+
///< external references to a PCH or module.
81+
82+
DEBUGOPT(DebugExplicitImport, 1, 0) ///< Whether or not debug info should
83+
///< contain explicit imports for
84+
///< anonymous namespaces
85+
86+
/// Set debug info source file hashing algorithm.
87+
ENUM_DEBUGOPT(DebugSrcHash, DebugSrcHashKind, 2, DSH_MD5)
88+
89+
DEBUGOPT(SplitDwarfInlining, 1, 1) ///< Whether to include inlining info in the
90+
///< skeleton CU to allow for symbolication
91+
///< of inline stack frames without .dwo files.
92+
DEBUGOPT(DebugFwdTemplateParams, 1, 0) ///< Whether to emit complete
93+
///< template parameter descriptions in
94+
///< forward declarations (versus just
95+
///< including them in the name).
96+
ENUM_DEBUGOPT(DebugSimpleTemplateNames,
97+
llvm::codegenoptions::DebugTemplateNamesKind, 2,
98+
llvm::codegenoptions::DebugTemplateNamesKind::Full)
99+
///< Whether to emit template parameters in the textual names of
100+
///< template specializations.
101+
///< Implies DebugFwdTemplateNames to allow decorated names to be
102+
///< reconstructed when needed.
103+
104+
/// The kind of generated debug info.
105+
ENUM_DEBUGOPT(DebugInfo, llvm::codegenoptions::DebugInfoKind, 4,
106+
llvm::codegenoptions::NoDebugInfo)
107+
108+
/// Whether to generate macro debug info.
109+
DEBUGOPT(MacroDebugInfo, 1, 0)
110+
111+
/// Tune the debug info for this debugger.
112+
ENUM_DEBUGOPT(DebuggerTuning, llvm::DebuggerKind, 3,
113+
llvm::DebuggerKind::Default)
114+
115+
/// Dwarf version. Version zero indicates to LLVM that no DWARF should be
116+
/// emitted.
117+
VALUE_DEBUGOPT(DwarfVersion, 3, 0)
118+
119+
/// Whether we should emit CodeView debug information. It's possible to emit
120+
/// CodeView and DWARF into the same object.
121+
DEBUGOPT(EmitCodeView, 1, 0)
122+
123+
/// Whether to emit the .debug$H section containing hashes of CodeView types.
124+
DEBUGOPT(CodeViewGHash, 1, 0)
125+
126+
/// Whether to emit the compiler path and command line into the CodeView debug information.
127+
DEBUGOPT(CodeViewCommandLine, 1, 0)
128+
129+
/// Whether emit extra debug info for sample pgo profile collection.
130+
DEBUGOPT(DebugInfoForProfiling, 1, 0)
131+
132+
/// Whether to emit .debug_gnu_pubnames section instead of .debug_pubnames.
133+
DEBUGOPT(DebugNameTable, 2, 0)
134+
135+
/// Whether to use DWARF base address specifiers in .debug_ranges.
136+
DEBUGOPT(DebugRangesBaseAddress, 1, 0)
137+
138+
/// Whether to embed source in DWARF debug line section.
139+
DEBUGOPT(EmbedSource, 1, 0)
140+
141+
#undef DEBUGOPT
142+
#undef ENUM_DEBUGOPT
143+
#undef VALUE_DEBUGOPT
144+
#undef BENIGN_DEBUGOPT
145+
#undef BENIGN_ENUM_DEBUGOPT
146+
#undef BENIGN_VALUE_DEBUGOPT

clang/include/module.modulemap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ module Clang_Basic {
6868
textual header "clang/Basic/BuiltinsX86_64.def"
6969
textual header "clang/Basic/BuiltinsXCore.def"
7070
textual header "clang/Basic/CodeGenOptions.def"
71+
textual header "clang/Basic/DebugOptions.def"
7172
textual header "clang/Basic/DiagnosticOptions.def"
7273
textual header "clang/Basic/Features.def"
7374
textual header "clang/Basic/FPOptions.def"

clang/lib/Basic/CodeGenOptions.cpp

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,39 @@ CodeGenOptions::CodeGenOptions() {
2020
memcpy(CoverageVersion, "408*", 4);
2121
}
2222

23+
void CodeGenOptions::resetNonModularOptions(StringRef ModuleFormat) {
24+
// First reset all CodeGen options only. The Debug options are handled later.
25+
#define DEBUGOPT(Name, Bits, Default)
26+
#define VALUE_DEBUGOPT(Name, Bits, Default)
27+
#define ENUM_DEBUGOPT(Name, Type, Bits, Default)
28+
#define CODEGENOPT(Name, Bits, Default) Name = Default;
29+
#define ENUM_CODEGENOPT(Name, Type, Bits, Default) set##Name(Default);
30+
#include "clang/Basic/CodeGenOptions.def"
31+
32+
// Next reset all debug options that can always be reset, because they never
33+
// affect the PCM.
34+
#define DEBUGOPT(Name, Bits, Default)
35+
#define VALUE_DEBUGOPT(Name, Bits, Default)
36+
#define ENUM_DEBUGOPT(Name, Type, Bits, Default)
37+
#define BENIGN_DEBUGOPT(Name, Bits, Default) Name = Default;
38+
#define BENIGN_VALUE_DEBUGOPT(Name, Bits, Default) Name = Default;
39+
#define BENIGN_ENUM_DEBUGOPT(Name, Type, Bits, Default) set##Name(Default);
40+
#include "clang/Basic/DebugOptions.def"
41+
42+
// Conditionally reset debug options that only matter when the debug info is
43+
// emitted into the PCM (-gmodules).
44+
if (ModuleFormat == "raw") {
45+
#define DEBUGOPT(Name, Bits, Default) Name = Default;
46+
#define VALUE_DEBUGOPT(Name, Bits, Default) Name = Default;
47+
#define ENUM_DEBUGOPT(Name, Type, Bits, Default) set##Name(Default);
48+
#define BENIGN_DEBUGOPT(Name, Bits, Default)
49+
#define BENIGN_VALUE_DEBUGOPT(Name, Bits, Default)
50+
#define BENIGN_ENUM_DEBUGOPT(Name, Type, Bits, Default)
51+
#include "clang/Basic/DebugOptions.def"
52+
}
53+
54+
RelocationModel = llvm::Reloc::PIC_;
55+
memcpy(CoverageVersion, "408*", 4);
56+
}
57+
2358
} // end namespace clang

clang/lib/Frontend/CompilerInvocation.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4787,6 +4787,18 @@ std::string CompilerInvocation::getModuleHash() const {
47874787
if (getCodeGenOpts().DebugTypeExtRefs)
47884788
HBuilder.addRange(getCodeGenOpts().DebugPrefixMap);
47894789

4790+
// Extend the signature with the affecting debug options.
4791+
if (getHeaderSearchOpts().ModuleFormat == "obj") {
4792+
#define DEBUGOPT(Name, Bits, Default) HBuilder.add(CodeGenOpts->Name);
4793+
#define VALUE_DEBUGOPT(Name, Bits, Default) HBuilder.add(CodeGenOpts->Name);
4794+
#define ENUM_DEBUGOPT(Name, Type, Bits, Default) \
4795+
HBuilder.add(static_cast<unsigned>(CodeGenOpts->get##Name()));
4796+
#define BENIGN_DEBUGOPT(Name, Bits, Default)
4797+
#define BENIGN_VALUE_DEBUGOPT(Name, Bits, Default)
4798+
#define BENIGN_ENUM_DEBUGOPT(Name, Type, Bits, Default)
4799+
#include "clang/Basic/DebugOptions.def"
4800+
}
4801+
47904802
// Extend the signature with the enabled sanitizers, if at least one is
47914803
// enabled. Sanitizers which cannot affect AST generation aren't hashed.
47924804
SanitizerSet SanHash = getLangOpts().Sanitize;
@@ -4833,6 +4845,7 @@ std::vector<std::string> CompilerInvocationBase::getCC1CommandLine() const {
48334845
void CompilerInvocation::resetNonModularOptions() {
48344846
getLangOpts().resetNonModularOptions();
48354847
getPreprocessorOpts().resetNonModularOptions();
4848+
getCodeGenOpts().resetNonModularOptions(getHeaderSearchOpts().ModuleFormat);
48364849
}
48374850

48384851
void CompilerInvocation::clearImplicitModuleBuildOptions() {

0 commit comments

Comments
 (0)