diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2021-01-12 14:04:06 +0100 |
---|---|---|
committer | Jan Svoboda <jan_svoboda@apple.com> | 2021-01-20 10:48:22 +0100 |
commit | e20d46628a31a984074f2e1029e67734d5c2ab0d (patch) | |
tree | 7376532be9598bd956b8034e56992ee59d433f84 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 4ab704d62820396af5bd4a4322a5cbc2700a7ec3 (diff) | |
download | llvm-e20d46628a31a984074f2e1029e67734d5c2ab0d.zip llvm-e20d46628a31a984074f2e1029e67734d5c2ab0d.tar.gz llvm-e20d46628a31a984074f2e1029e67734d5c2ab0d.tar.bz2 |
[clang][cli] Port more options to new parsing system
This patch adds marshalling information to more options.
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D94957
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index dac0dc6..24b8fd1 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -634,13 +634,6 @@ static bool ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args, } } - 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)) { @@ -828,10 +821,6 @@ static void parseAnalyzerConfigs(AnalyzerOptions &AnOpts, << "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> @@ -1645,7 +1634,6 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args, 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)); @@ -1686,7 +1674,6 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args, 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" @@ -2845,8 +2832,6 @@ static void ParsePreprocessorArgs(PreprocessorOptions &Opts, ArgList &Args, 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()); @@ -2930,9 +2915,6 @@ static void ParsePreprocessorOutputArgs(PreprocessorOutputOptions &Opts, 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())) @@ -2987,7 +2969,6 @@ bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res, } 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); |