def mno_wavefrontsize64 : Flag<["-"], "mno-wavefrontsize64">, Group<m_Group>,
HelpText<"Specify wavefront size 32 mode (AMDGPU only)">;
-def munsafe_fp_atomics : Flag<["-"], "munsafe-fp-atomics">, Group<m_Group>,
- HelpText<"Enable unsafe floating point atomic instructions (AMDGPU only)">,
- Flags<[CC1Option]>;
-def mno_unsafe_fp_atomics : Flag<["-"], "mno-unsafe-fp-atomics">, Group<m_Group>;
+defm unsafe_fp_atomics : BoolCC1Option<"unsafe-fp-atomics",
+ TargetOpts<"AllowAMDGPUUnsafeFPAtomics">, DefaultsToFalse,
+ ChangedBy<PosFlag, [], "Enable unsafe floating point atomic instructions (AMDGPU only)">,
+ ResetBy<NegFlag>, BothFlags<[]>, "m">, Group<m_Group>;
def faltivec : Flag<["-"], "faltivec">, Group<f_Group>, Flags<[NoXarchOption]>;
def fno_altivec : Flag<["-"], "fno-altivec">, Group<f_Group>, Flags<[NoXarchOption]>;
MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerOptionDeveloperList">>;
def analyzer_config_compatibility_mode : Separate<["-"], "analyzer-config-compatibility-mode">,
- HelpText<"Don't emit errors on invalid analyzer-config inputs">;
+ HelpText<"Don't emit errors on invalid analyzer-config inputs">,
+ Values<"true,false">, NormalizedValues<[[{false}], [{true}]]>,
+ MarshallingInfoString<AnalyzerOpts<"ShouldEmitErrorsOnInvalidConfigValue">, [{true}]>,
+ AutoNormalizeEnum;
def analyzer_config_compatibility_mode_EQ : Joined<["-"], "analyzer-config-compatibility-mode=">,
Alias<analyzer_config_compatibility_mode>;
MetaVarName<"<name> <arg>">,
HelpText<"Pass <arg> to plugin <name>">;
def add_plugin : Separate<["-"], "add-plugin">, MetaVarName<"<name>">,
- HelpText<"Use the named plugin action in addition to the default action">;
+ HelpText<"Use the named plugin action in addition to the default action">,
+ MarshallingInfoStringVector<FrontendOpts<"AddPluginActions">>;
def ast_dump_filter : Separate<["-"], "ast-dump-filter">,
MetaVarName<"<dump_filter>">,
HelpText<"Use with -ast-dump or -ast-print to dump/print only AST declaration"
def fno_validate_pch : Flag<["-"], "fno-validate-pch">,
HelpText<"Disable validation of precompiled headers">,
MarshallingInfoFlag<PreprocessorOpts<"DisablePCHValidation">>;
-def fallow_pch_with_errors : Flag<["-"], "fallow-pch-with-compiler-errors">,
- HelpText<"Accept a PCH file that was created with compiler errors">;
def fallow_pcm_with_errors : Flag<["-"], "fallow-pcm-with-compiler-errors">,
- HelpText<"Accept a PCM file that was created with compiler errors">;
+ HelpText<"Accept a PCM file that was created with compiler errors">,
+ MarshallingInfoFlag<FrontendOpts<"AllowPCMWithCompilerErrors">>;
+def fallow_pch_with_errors : Flag<["-"], "fallow-pch-with-compiler-errors">,
+ HelpText<"Accept a PCH file that was created with compiler errors">,
+ MarshallingInfoFlag<PreprocessorOpts<"AllowPCHWithCompilerErrors">>,
+ ImpliedByAnyOf<[fallow_pcm_with_errors]>;
def dump_deserialized_pch_decls : Flag<["-"], "dump-deserialized-decls">,
HelpText<"Dump declarations that are deserialized from PCH, for testing">,
MarshallingInfoFlag<PreprocessorOpts<"DumpDeserializedPCHDecls">>;
}
}
- Opts.ShouldEmitErrorsOnInvalidConfigValue =
- /* negated */!llvm::StringSwitch<bool>(
- Args.getLastArgValue(OPT_analyzer_config_compatibility_mode))
- .Case("true", true)
- .Case("false", false)
- .Default(false);
-
Opts.CheckersAndPackages.clear();
for (const Arg *A :
Args.filtered(OPT_analyzer_checker, OPT_analyzer_disable_checker)) {
<< "a filename";
}
-static void ParseCommentArgs(CommentOptions &Opts, ArgList &Args) {
- Opts.ParseAllComments = Args.hasArg(OPT_fparse_all_comments);
-}
-
/// Create a new Regex instance out of the string value in \p RpassArg.
/// It returns a pointer to the newly generated Regex instance.
static std::shared_ptr<llvm::Regex>
Opts.ProgramAction = frontend::PluginAction;
Opts.ActionName = A->getValue();
}
- Opts.AddPluginActions = Args.getAllArgValues(OPT_add_plugin);
for (const auto *AA : Args.filtered(OPT_plugin_arg))
Opts.PluginArgs[AA->getValue(0)].emplace_back(AA->getValue(1));
if (Val.find('=') == StringRef::npos)
Opts.ModuleFiles.push_back(std::string(Val));
}
- Opts.AllowPCMWithCompilerErrors = Args.hasArg(OPT_fallow_pcm_with_errors);
if (Opts.ProgramAction != frontend::GenerateModule && Opts.IsSystemModule)
Diags.Report(diag::err_drv_argument_only_allowed_with) << "-fsystem-module"
frontend::ActionKind Action) {
Opts.PCHWithHdrStop = Args.hasArg(OPT_pch_through_hdrstop_create) ||
Args.hasArg(OPT_pch_through_hdrstop_use);
- Opts.AllowPCHWithCompilerErrors =
- Args.hasArg(OPT_fallow_pch_with_errors, OPT_fallow_pcm_with_errors);
for (const auto *A : Args.filtered(OPT_error_on_deserialized_pch_decl))
Opts.DeserializedPCHDeclsToErrorOn.insert(A->getValue());
static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args,
DiagnosticsEngine &Diags) {
- Opts.AllowAMDGPUUnsafeFPAtomics =
- Args.hasFlag(options::OPT_munsafe_fp_atomics,
- options::OPT_mno_unsafe_fp_atomics, false);
if (Arg *A = Args.getLastArg(options::OPT_target_sdk_version_EQ)) {
llvm::VersionTuple Version;
if (Version.tryParse(A->getValue()))
}
Success &= ParseDiagnosticArgs(Res.getDiagnosticOpts(), Args, &Diags,
/*DefaultDiagColor=*/false);
- ParseCommentArgs(LangOpts.CommentOpts, Args);
// FIXME: We shouldn't have to pass the DashX option around here
InputKind DashX = ParseFrontendArgs(Res.getFrontendOpts(), Args, Diags,
LangOpts.IsHeaderFile);