@@ -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
@@ -1362,8 +1361,11 @@ defm cxx_exceptions: BoolFOption<"cxx-exceptions",
1362
1361
defm async_exceptions: BoolFOption<"async-exceptions",
1363
1362
LangOpts<"EHAsynch">, DefaultFalse,
1364
1363
PosFlag<SetTrue, [CC1Option], "Enable EH Asynchronous exceptions">, NegFlag<SetFalse>>;
1365
- def fcxx_modules : Flag <["-"], "fcxx-modules">, Group<f_Group>,
1366
- Flags<[NoXarchOption]>;
1364
+ defm cxx_modules : BoolFOption<"cxx-modules",
1365
+ LangOpts<"CPlusPlusModules">, Default<cpp20.KeyPath>,
1366
+ NegFlag<SetFalse, [CC1Option], "Disable">, PosFlag<SetTrue, [], "Enable">,
1367
+ BothFlags<[NoXarchOption], " modules for C++">>,
1368
+ ShouldParseIf<cplusplus.KeyPath>;
1367
1369
def fdebug_pass_arguments : Flag<["-"], "fdebug-pass-arguments">, Group<f_Group>;
1368
1370
def fdebug_pass_structure : Flag<["-"], "fdebug-pass-structure">, Group<f_Group>;
1369
1371
def fdepfile_entry : Joined<["-"], "fdepfile-entry=">,
@@ -2181,7 +2183,7 @@ def fmodules_ts : Flag <["-"], "fmodules-ts">, Group<f_Group>,
2181
2183
Flags<[CC1Option]>, HelpText<"Enable support for the C++ Modules TS">,
2182
2184
MarshallingInfoFlag<LangOpts<"ModulesTS">>;
2183
2185
defm modules : BoolFOption<"modules",
2184
- LangOpts<"Modules">, Default<!strconcat(fmodules_ts.KeyPath, "||", cpp_modules .KeyPath)>,
2186
+ LangOpts<"Modules">, Default<!strconcat(fmodules_ts.KeyPath, "||", fcxx_modules .KeyPath)>,
2185
2187
PosFlag<SetTrue, [CC1Option], "Enable the 'modules' language feature">,
2186
2188
NegFlag<SetFalse>, BothFlags<[NoXarchOption]>>;
2187
2189
def fmodule_maps : Flag <["-"], "fmodule-maps">, Alias<fimplicit_module_maps>;
@@ -2239,8 +2241,6 @@ def fno_diagnostics_color : Flag<["-"], "fno-diagnostics-color">, Group<f_Group>
2239
2241
Flags<[CoreOption, NoXarchOption]>;
2240
2242
def fno_common : Flag<["-"], "fno-common">, Group<f_Group>, Flags<[CC1Option]>,
2241
2243
HelpText<"Compile common globals like normal definitions">;
2242
- def fno_cxx_modules : Flag <["-"], "fno-cxx-modules">, Group<f_Group>,
2243
- Flags<[NoXarchOption]>;
2244
2244
defm digraphs : BoolFOption<"digraphs",
2245
2245
LangOpts<"Digraphs">, Default<std#".hasDigraphs()">,
2246
2246
PosFlag<SetTrue, [], "Enable alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:' (default)">,
@@ -5368,7 +5368,7 @@ def fmodules_local_submodule_visibility :
5368
5368
HelpText<"Enforce name visibility rules across submodules of the same "
5369
5369
"top-level module.">,
5370
5370
MarshallingInfoFlag<LangOpts<"ModulesLocalVisibility">>,
5371
- ImpliedByAnyOf<[fmodules_ts.KeyPath, cpp_modules .KeyPath]>;
5371
+ ImpliedByAnyOf<[fmodules_ts.KeyPath, fcxx_modules .KeyPath]>;
5372
5372
def fmodules_codegen :
5373
5373
Flag<["-"], "fmodules-codegen">,
5374
5374
HelpText<"Generate code for uses of this module that assumes an explicit "
0 commit comments