@@ -467,7 +467,6 @@ defvar render_script = LangOpts<"RenderScript">;
467
467
defvar hip = LangOpts<"HIP">;
468
468
defvar gnu_mode = LangOpts<"GNUMode">;
469
469
defvar asm_preprocessor = LangOpts<"AsmPreprocessor">;
470
- defvar cpp_modules = LangOpts<"CPlusPlusModules">;
471
470
472
471
defvar std = !strconcat("LangStandard::getLangStandardForKind(", lang_std.KeyPath, ")");
473
472
@@ -1332,8 +1331,11 @@ defm cxx_exceptions: BoolFOption<"cxx-exceptions",
1332
1331
defm async_exceptions: BoolFOption<"async-exceptions",
1333
1332
LangOpts<"EHAsynch">, DefaultFalse,
1334
1333
PosFlag<SetTrue, [CC1Option], "Enable EH Asynchronous exceptions">, NegFlag<SetFalse>>;
1335
- def fcxx_modules : Flag <["-"], "fcxx-modules">, Group<f_Group>,
1336
- Flags<[NoXarchOption]>;
1334
+ defm cxx_modules : BoolFOption<"cxx-modules",
1335
+ LangOpts<"CPlusPlusModules">, Default<cpp20.KeyPath>,
1336
+ NegFlag<SetFalse, [CC1Option], "Disable">, PosFlag<SetTrue, [], "Enable">,
1337
+ BothFlags<[NoXarchOption], " modules for C++">>,
1338
+ ShouldParseIf<cplusplus.KeyPath>;
1337
1339
def fdebug_pass_arguments : Flag<["-"], "fdebug-pass-arguments">, Group<f_Group>;
1338
1340
def fdebug_pass_structure : Flag<["-"], "fdebug-pass-structure">, Group<f_Group>;
1339
1341
def fdepfile_entry : Joined<["-"], "fdepfile-entry=">,
@@ -2154,7 +2156,7 @@ def fmodules_ts : Flag <["-"], "fmodules-ts">, Group<f_Group>,
2154
2156
Flags<[CC1Option]>, HelpText<"Enable support for the C++ Modules TS">,
2155
2157
MarshallingInfoFlag<LangOpts<"ModulesTS">>;
2156
2158
defm modules : BoolFOption<"modules",
2157
- LangOpts<"Modules">, Default<!strconcat(fmodules_ts.KeyPath, "||", cpp_modules .KeyPath)>,
2159
+ LangOpts<"Modules">, Default<!strconcat(fmodules_ts.KeyPath, "||", fcxx_modules .KeyPath)>,
2158
2160
PosFlag<SetTrue, [CC1Option], "Enable the 'modules' language feature">,
2159
2161
NegFlag<SetFalse>, BothFlags<[NoXarchOption, CoreOption]>>;
2160
2162
def fmodule_maps : Flag <["-"], "fmodule-maps">, Flags<[CoreOption]>, Alias<fimplicit_module_maps>;
@@ -2213,8 +2215,6 @@ def fno_diagnostics_color : Flag<["-"], "fno-diagnostics-color">, Group<f_Group>
2213
2215
Flags<[CoreOption, NoXarchOption]>;
2214
2216
def fno_common : Flag<["-"], "fno-common">, Group<f_Group>, Flags<[CC1Option]>,
2215
2217
HelpText<"Compile common globals like normal definitions">;
2216
- def fno_cxx_modules : Flag <["-"], "fno-cxx-modules">, Group<f_Group>,
2217
- Flags<[NoXarchOption]>;
2218
2218
defm digraphs : BoolFOption<"digraphs",
2219
2219
LangOpts<"Digraphs">, Default<std#".hasDigraphs()">,
2220
2220
PosFlag<SetTrue, [], "Enable alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:' (default)">,
@@ -5298,7 +5298,7 @@ def fmodules_local_submodule_visibility :
5298
5298
HelpText<"Enforce name visibility rules across submodules of the same "
5299
5299
"top-level module.">,
5300
5300
MarshallingInfoFlag<LangOpts<"ModulesLocalVisibility">>,
5301
- ImpliedByAnyOf<[fmodules_ts.KeyPath, cpp_modules .KeyPath]>;
5301
+ ImpliedByAnyOf<[fmodules_ts.KeyPath, fcxx_modules .KeyPath]>;
5302
5302
def fmodules_codegen :
5303
5303
Flag<["-"], "fmodules-codegen">,
5304
5304
HelpText<"Generate code for uses of this module that assumes an explicit "
0 commit comments