@@ -272,7 +272,7 @@ class MigratorOpts<string base>
272
272
// Args.hasArg(OPT_ffoo) can be used to check that the flag is enabled.
273
273
// This is useful if the option is usually disabled.
274
274
// Use this only when the option cannot be declared via BoolFOption.
275
- multiclass OptInFFlag <string name, string pos_prefix, string neg_prefix="",
275
+ multiclass OptInCC1FFlag <string name, string pos_prefix, string neg_prefix="",
276
276
string help="", list<OptionFlag> flags=[]> {
277
277
def f#NAME : Flag<["-"], "f"#name>, Flags<[CC1Option] # flags>,
278
278
Group<f_Group>, HelpText<pos_prefix # help>;
@@ -283,14 +283,35 @@ multiclass OptInFFlag<string name, string pos_prefix, string neg_prefix="",
283
283
// A boolean option which is opt-out in CC1. The negative option exists in CC1 and
284
284
// Args.hasArg(OPT_fno_foo) can be used to check that the flag is disabled.
285
285
// Use this only when the option cannot be declared via BoolFOption.
286
- multiclass OptOutFFlag <string name, string pos_prefix, string neg_prefix,
286
+ multiclass OptOutCC1FFlag <string name, string pos_prefix, string neg_prefix,
287
287
string help="", list<OptionFlag> flags=[]> {
288
288
def f#NAME : Flag<["-"], "f"#name>, Flags<flags>,
289
289
Group<f_Group>, HelpText<pos_prefix # help>;
290
290
def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<[CC1Option] # flags>,
291
291
Group<f_Group>, HelpText<neg_prefix # help>;
292
292
}
293
293
294
+ // A boolean option which is opt-in in FC1. The positive option exists in FC1 and
295
+ // Args.hasArg(OPT_ffoo) can be used to check that the flag is enabled.
296
+ // This is useful if the option is usually disabled.
297
+ multiclass OptInFC1FFlag<string name, string pos_prefix, string neg_prefix="",
298
+ string help="", list<OptionFlag> flags=[]> {
299
+ def f#NAME : Flag<["-"], "f"#name>, Flags<[FC1Option] # flags>,
300
+ Group<f_Group>, HelpText<pos_prefix # help>;
301
+ def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<flags>,
302
+ Group<f_Group>, HelpText<neg_prefix # help>;
303
+ }
304
+
305
+ // A boolean option which is opt-out in FC1. The negative option exists in FC1 and
306
+ // Args.hasArg(OPT_fno_foo) can be used to check that the flag is disabled.
307
+ multiclass OptOutFC1FFlag<string name, string pos_prefix, string neg_prefix,
308
+ string help="", list<OptionFlag> flags=[]> {
309
+ def f#NAME : Flag<["-"], "f"#name>, Flags<flags>,
310
+ Group<f_Group>, HelpText<pos_prefix # help>;
311
+ def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<[FC1Option] # flags>,
312
+ Group<f_Group>, HelpText<neg_prefix # help>;
313
+ }
314
+
294
315
// Creates a positive and negative flags where both of them are prefixed with
295
316
// "m", have help text specified for positive and negative option, and a Group
296
317
// optionally specified by the opt_group argument, otherwise Group<m_Group>.
@@ -1257,7 +1278,7 @@ defm addrsig : BoolFOption<"addrsig",
1257
1278
CodeGenOpts<"Addrsig">, DefaultFalse,
1258
1279
PosFlag<SetTrue, [CC1Option], "Emit">, NegFlag<SetFalse, [], "Don't emit">,
1259
1280
BothFlags<[CoreOption], " an address-significance table">>;
1260
- defm blocks : OptInFFlag <"blocks", "Enable the 'blocks' language feature", "", "", [CoreOption]>;
1281
+ defm blocks : OptInCC1FFlag <"blocks", "Enable the 'blocks' language feature", "", "", [CoreOption]>;
1261
1282
def fbootclasspath_EQ : Joined<["-"], "fbootclasspath=">, Group<f_Group>;
1262
1283
defm borland_extensions : BoolFOption<"borland-extensions",
1263
1284
LangOpts<"Borland">, DefaultFalse,
@@ -1273,7 +1294,7 @@ def fclang_abi_compat_EQ : Joined<["-"], "fclang-abi-compat=">, Group<f_clang_Gr
1273
1294
Flags<[CC1Option]>, MetaVarName<"<version>">, Values<"<major>.<minor>,latest">,
1274
1295
HelpText<"Attempt to match the ABI of Clang <version>">;
1275
1296
def fclasspath_EQ : Joined<["-"], "fclasspath=">, Group<f_Group>;
1276
- defm color_diagnostics : OptInFFlag <"color-diagnostics", "Enable", "Disable", " colors in diagnostics",
1297
+ defm color_diagnostics : OptInCC1FFlag <"color-diagnostics", "Enable", "Disable", " colors in diagnostics",
1277
1298
[CoreOption, FlangOption]>;
1278
1299
def fdiagnostics_color : Flag<["-"], "fdiagnostics-color">, Group<f_Group>,
1279
1300
Flags<[CoreOption, NoXarchOption]>;
@@ -1394,7 +1415,7 @@ def fno_elide_type : Flag<["-"], "fno-elide-type">, Group<f_Group>,
1394
1415
HelpText<"Do not elide types when printing diagnostics">,
1395
1416
MarshallingInfoNegativeFlag<DiagnosticOpts<"ElideType">>;
1396
1417
def feliminate_unused_debug_symbols : Flag<["-"], "feliminate-unused-debug-symbols">, Group<f_Group>;
1397
- defm eliminate_unused_debug_types : OptOutFFlag <"eliminate-unused-debug-types",
1418
+ defm eliminate_unused_debug_types : OptOutCC1FFlag <"eliminate-unused-debug-types",
1398
1419
"Do not emit ", "Emit ", " debug info for defined but unused types">;
1399
1420
def femit_all_decls : Flag<["-"], "femit-all-decls">, Group<f_Group>, Flags<[CC1Option]>,
1400
1421
HelpText<"Emit all declarations, even if unused">,
@@ -1499,7 +1520,7 @@ defm cxx_static_destructors : BoolFOption<"c++-static-destructors",
1499
1520
def fsymbol_partition_EQ : Joined<["-"], "fsymbol-partition=">, Group<f_Group>,
1500
1521
Flags<[CC1Option]>, MarshallingInfoString<CodeGenOpts<"SymbolPartition">>;
1501
1522
1502
- defm memory_profile : OptInFFlag <"memory-profile", "Enable", "Disable", " heap memory profiling">;
1523
+ defm memory_profile : OptInCC1FFlag <"memory-profile", "Enable", "Disable", " heap memory profiling">;
1503
1524
def fmemory_profile_EQ : Joined<["-"], "fmemory-profile=">,
1504
1525
Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<directory>">,
1505
1526
HelpText<"Enable heap memory profiling and dump results into <directory>">;
@@ -2143,9 +2164,9 @@ defm pch_instantiate_templates : BoolFOption<"pch-instantiate-templates",
2143
2164
LangOpts<"PCHInstantiateTemplates">, DefaultFalse,
2144
2165
PosFlag<SetTrue, [], "Instantiate templates already while building a PCH">,
2145
2166
NegFlag<SetFalse>, BothFlags<[CC1Option, CoreOption]>>;
2146
- defm pch_codegen: OptInFFlag <"pch-codegen", "Generate ", "Do not generate ",
2167
+ defm pch_codegen: OptInCC1FFlag <"pch-codegen", "Generate ", "Do not generate ",
2147
2168
"code for uses of this PCH that assumes an explicit object file will be built for the PCH">;
2148
- defm pch_debuginfo: OptInFFlag <"pch-debuginfo", "Generate ", "Do not generate ",
2169
+ defm pch_debuginfo: OptInCC1FFlag <"pch-debuginfo", "Generate ", "Do not generate ",
2149
2170
"debug info for types in an object file built from this PCH and do not generate them elsewhere">;
2150
2171
2151
2172
def fimplicit_module_maps : Flag <["-"], "fimplicit-module-maps">, Group<f_Group>,
@@ -4509,26 +4530,18 @@ def fdefault_real_8 : Flag<["-"],"fdefault-real-8">, Group<f_Group>,
4509
4530
HelpText<"Set the default real kind to an 8 byte wide type">;
4510
4531
def flarge_sizes : Flag<["-"],"flarge-sizes">, Group<f_Group>,
4511
4532
HelpText<"Use INTEGER(KIND=8) for the result type in size-related intrinsics">;
4512
- def fbackslash : Flag<["-"], "fbackslash">, Group<f_Group>,
4513
- HelpText<"Specify that backslash in string introduces an escape character">,
4514
- DocBrief<[{Change the interpretation of backslashes in string literals from
4515
- a single backslash character to "C-style" escape characters.}]>;
4516
- def fno_backslash : Flag<["-"], "fno-backslash">, Group<f_Group>;
4517
- def fxor_operator : Flag<["-"], "fxor-operator">, Group<f_Group>,
4518
- HelpText<"Enable .XOR. as a synonym of .NEQV.">;
4519
- def fno_xor_operator : Flag<["-"], "fno-xor-operator">, Group<f_Group>;
4520
- def flogical_abbreviations : Flag<["-"], "flogical-abbreviations">, Group<f_Group>,
4521
- HelpText<"Enable logical abbreviations">;
4522
- def fno_logical_abbreviations : Flag<["-"], "fno-logical-abbreviations">, Group<f_Group>;
4523
- def fimplicit_none : Flag<["-"], "fimplicit-none">, Group<f_Group>,
4524
- HelpText<"No implicit typing allowed unless overridden by IMPLICIT statements">;
4525
- def fno_implicit_none : Flag<["-"], "fno-implicit-none">, Group<f_Group>;
4533
+
4526
4534
def falternative_parameter_statement : Flag<["-"], "falternative-parameter-statement">, Group<f_Group>,
4527
4535
HelpText<"Enable the old style PARAMETER statement">;
4528
4536
def fintrinsic_modules_path : Separate<["-"], "fintrinsic-modules-path">, Group<f_Group>, MetaVarName<"<dir>">,
4529
4537
HelpText<"Specify where to find the compiled intrinsic modules">,
4530
4538
DocBrief<[{This option specifies the location of pre-compiled intrinsic modules,
4531
4539
if they are not in the default location expected by the compiler.}]>;
4540
+
4541
+ defm backslash : OptInFC1FFlag<"backslash", "Specify that backslash in string introduces an escape character">;
4542
+ defm xor_operator : OptInFC1FFlag<"xor-operator", "Enable .XOR. as a synonym of .NEQV.">;
4543
+ defm logical_abbreviations : OptInFC1FFlag<"logical-abbreviations", "Enable logical abbreviations">;
4544
+ defm implicit_none : OptInFC1FFlag<"implicit-none", "No implicit typing allowed unless overridden by IMPLICIT statements">;
4532
4545
}
4533
4546
4534
4547
def J : JoinedOrSeparate<["-"], "J">,
@@ -4583,13 +4596,10 @@ def fget_symbols_sources : Flag<["-"], "fget-symbols-sources">, Group<Action_Gro
4583
4596
4584
4597
def module_suffix : Separate<["-"], "module-suffix">, Group<f_Group>, MetaVarName<"<suffix>">,
4585
4598
HelpText<"Use <suffix> as the suffix for module files (the default value is `.mod`)">;
4586
- def fanalyzed_objects_for_unparse : Flag<["-"],
4587
- "fanalyzed-objects-for-unparse">, Group<f_Group>;
4588
- def fno_analyzed_objects_for_unparse : Flag<["-"],
4589
- "fno-analyzed-objects-for-unparse">, Group<f_Group>,
4590
- HelpText<"Do not use the analyzed objects when unparsing">;
4591
4599
def fno_reformat : Flag<["-"], "fno-reformat">, Group<Preprocessor_Group>,
4592
4600
HelpText<"Dump the cooked character stream in -E mode">;
4601
+ defm analyzed_objects_for_unparse : OptOutFC1FFlag<"analyzed-objects-for-unparse", "", "Do not use the analyzed objects when unparsing">;
4602
+
4593
4603
}
4594
4604
4595
4605
//===----------------------------------------------------------------------===//
0 commit comments