@@ -274,7 +274,7 @@ class MigratorOpts<string base>
274
274
// Args.hasArg(OPT_ffoo) can be used to check that the flag is enabled.
275
275
// This is useful if the option is usually disabled.
276
276
// Use this only when the option cannot be declared via BoolFOption.
277
- multiclass OptInFFlag <string name, string pos_prefix, string neg_prefix="",
277
+ multiclass OptInCC1FFlag <string name, string pos_prefix, string neg_prefix="",
278
278
string help="", list<OptionFlag> flags=[]> {
279
279
def f#NAME : Flag<["-"], "f"#name>, Flags<[CC1Option] # flags>,
280
280
Group<f_Group>, HelpText<pos_prefix # help>;
@@ -285,14 +285,35 @@ multiclass OptInFFlag<string name, string pos_prefix, string neg_prefix="",
285
285
// A boolean option which is opt-out in CC1. The negative option exists in CC1 and
286
286
// Args.hasArg(OPT_fno_foo) can be used to check that the flag is disabled.
287
287
// Use this only when the option cannot be declared via BoolFOption.
288
- multiclass OptOutFFlag <string name, string pos_prefix, string neg_prefix,
288
+ multiclass OptOutCC1FFlag <string name, string pos_prefix, string neg_prefix,
289
289
string help="", list<OptionFlag> flags=[]> {
290
290
def f#NAME : Flag<["-"], "f"#name>, Flags<flags>,
291
291
Group<f_Group>, HelpText<pos_prefix # help>;
292
292
def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<[CC1Option] # flags>,
293
293
Group<f_Group>, HelpText<neg_prefix # help>;
294
294
}
295
295
296
+ // A boolean option which is opt-in in FC1. The positive option exists in FC1 and
297
+ // Args.hasArg(OPT_ffoo) can be used to check that the flag is enabled.
298
+ // This is useful if the option is usually disabled.
299
+ multiclass OptInFC1FFlag<string name, string pos_prefix, string neg_prefix="",
300
+ string help="", list<OptionFlag> flags=[]> {
301
+ def f#NAME : Flag<["-"], "f"#name>, Flags<[FC1Option] # flags>,
302
+ Group<f_Group>, HelpText<pos_prefix # help>;
303
+ def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<flags>,
304
+ Group<f_Group>, HelpText<neg_prefix # help>;
305
+ }
306
+
307
+ // A boolean option which is opt-out in FC1. The negative option exists in FC1 and
308
+ // Args.hasArg(OPT_fno_foo) can be used to check that the flag is disabled.
309
+ multiclass OptOutFC1FFlag<string name, string pos_prefix, string neg_prefix,
310
+ string help="", list<OptionFlag> flags=[]> {
311
+ def f#NAME : Flag<["-"], "f"#name>, Flags<flags>,
312
+ Group<f_Group>, HelpText<pos_prefix # help>;
313
+ def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<[FC1Option] # flags>,
314
+ Group<f_Group>, HelpText<neg_prefix # help>;
315
+ }
316
+
296
317
// Creates a positive and negative flags where both of them are prefixed with
297
318
// "m", have help text specified for positive and negative option, and a Group
298
319
// optionally specified by the opt_group argument, otherwise Group<m_Group>.
@@ -1278,7 +1299,7 @@ defm addrsig : BoolFOption<"addrsig",
1278
1299
CodeGenOpts<"Addrsig">, DefaultFalse,
1279
1300
PosFlag<SetTrue, [CC1Option], "Emit">, NegFlag<SetFalse, [], "Don't emit">,
1280
1301
BothFlags<[CoreOption], " an address-significance table">>;
1281
- defm blocks : OptInFFlag <"blocks", "Enable the 'blocks' language feature", "", "", [CoreOption]>;
1302
+ defm blocks : OptInCC1FFlag <"blocks", "Enable the 'blocks' language feature", "", "", [CoreOption]>;
1282
1303
def fbootclasspath_EQ : Joined<["-"], "fbootclasspath=">, Group<f_Group>;
1283
1304
defm borland_extensions : BoolFOption<"borland-extensions",
1284
1305
LangOpts<"Borland">, DefaultFalse,
@@ -1294,7 +1315,7 @@ def fclang_abi_compat_EQ : Joined<["-"], "fclang-abi-compat=">, Group<f_clang_Gr
1294
1315
Flags<[CC1Option]>, MetaVarName<"<version>">, Values<"<major>.<minor>,latest">,
1295
1316
HelpText<"Attempt to match the ABI of Clang <version>">;
1296
1317
def fclasspath_EQ : Joined<["-"], "fclasspath=">, Group<f_Group>;
1297
- defm color_diagnostics : OptInFFlag <"color-diagnostics", "Enable", "Disable", " colors in diagnostics",
1318
+ defm color_diagnostics : OptInCC1FFlag <"color-diagnostics", "Enable", "Disable", " colors in diagnostics",
1298
1319
[CoreOption, FlangOption]>;
1299
1320
def fdiagnostics_color : Flag<["-"], "fdiagnostics-color">, Group<f_Group>,
1300
1321
Flags<[CoreOption, NoXarchOption]>;
@@ -1415,7 +1436,7 @@ def fno_elide_type : Flag<["-"], "fno-elide-type">, Group<f_Group>,
1415
1436
HelpText<"Do not elide types when printing diagnostics">,
1416
1437
MarshallingInfoNegativeFlag<DiagnosticOpts<"ElideType">>;
1417
1438
def feliminate_unused_debug_symbols : Flag<["-"], "feliminate-unused-debug-symbols">, Group<f_Group>;
1418
- defm eliminate_unused_debug_types : OptOutFFlag <"eliminate-unused-debug-types",
1439
+ defm eliminate_unused_debug_types : OptOutCC1FFlag <"eliminate-unused-debug-types",
1419
1440
"Do not emit ", "Emit ", " debug info for defined but unused types">;
1420
1441
def femit_all_decls : Flag<["-"], "femit-all-decls">, Group<f_Group>, Flags<[CC1Option]>,
1421
1442
HelpText<"Emit all declarations, even if unused">,
@@ -1520,7 +1541,7 @@ defm cxx_static_destructors : BoolFOption<"c++-static-destructors",
1520
1541
def fsymbol_partition_EQ : Joined<["-"], "fsymbol-partition=">, Group<f_Group>,
1521
1542
Flags<[CC1Option]>, MarshallingInfoString<CodeGenOpts<"SymbolPartition">>;
1522
1543
1523
- defm memory_profile : OptInFFlag <"memory-profile", "Enable", "Disable", " heap memory profiling">;
1544
+ defm memory_profile : OptInCC1FFlag <"memory-profile", "Enable", "Disable", " heap memory profiling">;
1524
1545
def fmemory_profile_EQ : Joined<["-"], "fmemory-profile=">,
1525
1546
Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<directory>">,
1526
1547
HelpText<"Enable heap memory profiling and dump results into <directory>">;
@@ -2164,9 +2185,9 @@ defm pch_instantiate_templates : BoolFOption<"pch-instantiate-templates",
2164
2185
LangOpts<"PCHInstantiateTemplates">, DefaultFalse,
2165
2186
PosFlag<SetTrue, [], "Instantiate templates already while building a PCH">,
2166
2187
NegFlag<SetFalse>, BothFlags<[CC1Option, CoreOption]>>;
2167
- defm pch_codegen: OptInFFlag <"pch-codegen", "Generate ", "Do not generate ",
2188
+ defm pch_codegen: OptInCC1FFlag <"pch-codegen", "Generate ", "Do not generate ",
2168
2189
"code for uses of this PCH that assumes an explicit object file will be built for the PCH">;
2169
- defm pch_debuginfo: OptInFFlag <"pch-debuginfo", "Generate ", "Do not generate ",
2190
+ defm pch_debuginfo: OptInCC1FFlag <"pch-debuginfo", "Generate ", "Do not generate ",
2170
2191
"debug info for types in an object file built from this PCH and do not generate them elsewhere">;
2171
2192
2172
2193
def fimplicit_module_maps : Flag <["-"], "fimplicit-module-maps">, Group<f_Group>,
@@ -4574,7 +4595,7 @@ def : Flag<["-"], "fsycl-explicit-simd">, Flags<[CoreOption]>, Group<clang_ignor
4574
4595
HelpText<"Enable SYCL explicit SIMD extension. (deprecated)">;
4575
4596
def : Flag<["-"], "fno-sycl-explicit-simd">, Flags<[CoreOption]>, Group<clang_ignored_legacy_options_Group>,
4576
4597
HelpText<"Disable SYCL explicit SIMD extension. (deprecated)">;
4577
- defm sycl_early_optimizations : OptOutFFlag <"sycl-early-optimizations", "Enable", "Disable", " standard optimization pipeline for SYCL device compiler", [CoreOption]>;
4598
+ defm sycl_early_optimizations : OptOutCC1FFlag <"sycl-early-optimizations", "Enable", "Disable", " standard optimization pipeline for SYCL device compiler", [CoreOption]>;
4578
4599
def fsycl_dead_args_optimization : Flag<["-"], "fsycl-dead-args-optimization">,
4579
4600
Group<sycl_Group>, Flags<[NoArgumentUnused, CoreOption]>, HelpText<"Enables "
4580
4601
"elimination of DPC++ dead kernel arguments">;
@@ -4633,26 +4654,18 @@ def fdefault_real_8 : Flag<["-"],"fdefault-real-8">, Group<f_Group>,
4633
4654
HelpText<"Set the default real kind to an 8 byte wide type">;
4634
4655
def flarge_sizes : Flag<["-"],"flarge-sizes">, Group<f_Group>,
4635
4656
HelpText<"Use INTEGER(KIND=8) for the result type in size-related intrinsics">;
4636
- def fbackslash : Flag<["-"], "fbackslash">, Group<f_Group>,
4637
- HelpText<"Specify that backslash in string introduces an escape character">,
4638
- DocBrief<[{Change the interpretation of backslashes in string literals from
4639
- a single backslash character to "C-style" escape characters.}]>;
4640
- def fno_backslash : Flag<["-"], "fno-backslash">, Group<f_Group>;
4641
- def fxor_operator : Flag<["-"], "fxor-operator">, Group<f_Group>,
4642
- HelpText<"Enable .XOR. as a synonym of .NEQV.">;
4643
- def fno_xor_operator : Flag<["-"], "fno-xor-operator">, Group<f_Group>;
4644
- def flogical_abbreviations : Flag<["-"], "flogical-abbreviations">, Group<f_Group>,
4645
- HelpText<"Enable logical abbreviations">;
4646
- def fno_logical_abbreviations : Flag<["-"], "fno-logical-abbreviations">, Group<f_Group>;
4647
- def fimplicit_none : Flag<["-"], "fimplicit-none">, Group<f_Group>,
4648
- HelpText<"No implicit typing allowed unless overridden by IMPLICIT statements">;
4649
- def fno_implicit_none : Flag<["-"], "fno-implicit-none">, Group<f_Group>;
4657
+
4650
4658
def falternative_parameter_statement : Flag<["-"], "falternative-parameter-statement">, Group<f_Group>,
4651
4659
HelpText<"Enable the old style PARAMETER statement">;
4652
4660
def fintrinsic_modules_path : Separate<["-"], "fintrinsic-modules-path">, Group<f_Group>, MetaVarName<"<dir>">,
4653
4661
HelpText<"Specify where to find the compiled intrinsic modules">,
4654
4662
DocBrief<[{This option specifies the location of pre-compiled intrinsic modules,
4655
4663
if they are not in the default location expected by the compiler.}]>;
4664
+
4665
+ defm backslash : OptInFC1FFlag<"backslash", "Specify that backslash in string introduces an escape character">;
4666
+ defm xor_operator : OptInFC1FFlag<"xor-operator", "Enable .XOR. as a synonym of .NEQV.">;
4667
+ defm logical_abbreviations : OptInFC1FFlag<"logical-abbreviations", "Enable logical abbreviations">;
4668
+ defm implicit_none : OptInFC1FFlag<"implicit-none", "No implicit typing allowed unless overridden by IMPLICIT statements">;
4656
4669
}
4657
4670
4658
4671
def J : JoinedOrSeparate<["-"], "J">,
@@ -4707,13 +4720,10 @@ def fget_symbols_sources : Flag<["-"], "fget-symbols-sources">, Group<Action_Gro
4707
4720
4708
4721
def module_suffix : Separate<["-"], "module-suffix">, Group<f_Group>, MetaVarName<"<suffix>">,
4709
4722
HelpText<"Use <suffix> as the suffix for module files (the default value is `.mod`)">;
4710
- def fanalyzed_objects_for_unparse : Flag<["-"],
4711
- "fanalyzed-objects-for-unparse">, Group<f_Group>;
4712
- def fno_analyzed_objects_for_unparse : Flag<["-"],
4713
- "fno-analyzed-objects-for-unparse">, Group<f_Group>,
4714
- HelpText<"Do not use the analyzed objects when unparsing">;
4715
4723
def fno_reformat : Flag<["-"], "fno-reformat">, Group<Preprocessor_Group>,
4716
4724
HelpText<"Dump the cooked character stream in -E mode">;
4725
+ defm analyzed_objects_for_unparse : OptOutFC1FFlag<"analyzed-objects-for-unparse", "", "Do not use the analyzed objects when unparsing">;
4726
+
4717
4727
}
4718
4728
4719
4729
//===----------------------------------------------------------------------===//
0 commit comments