diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2020-12-16 16:03:00 +0100 |
---|---|---|
committer | Jan Svoboda <jan_svoboda@apple.com> | 2020-12-18 09:52:20 +0100 |
commit | d1b3f82e51378dd9fb5a23806d8fa906151f5e7b (patch) | |
tree | a97d2202fc75bf922a52f1c379b662799e3a3aa7 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | aec2991d083a9c5b92f94d84a7b3a7bbed405af8 (diff) | |
download | llvm-d1b3f82e51378dd9fb5a23806d8fa906151f5e7b.zip llvm-d1b3f82e51378dd9fb5a23806d8fa906151f5e7b.tar.gz llvm-d1b3f82e51378dd9fb5a23806d8fa906151f5e7b.tar.bz2 |
[clang][cli] Port PreprocessorOpts simple string based options to new option parsing system
Depends on D84671
Reviewed By: Bigcheese
Original patch by Daniel Grumberg.
Differential Revision: https://reviews.llvm.org/D84672
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 5eea882..a2ff437 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -3115,11 +3115,8 @@ static bool isStrictlyPreprocessorAction(frontend::ActionKind Action) { static void ParsePreprocessorArgs(PreprocessorOptions &Opts, ArgList &Args, DiagnosticsEngine &Diags, frontend::ActionKind Action) { - Opts.ImplicitPCHInclude = std::string(Args.getLastArgValue(OPT_include_pch)); Opts.PCHWithHdrStop = Args.hasArg(OPT_pch_through_hdrstop_create) || Args.hasArg(OPT_pch_through_hdrstop_use); - Opts.PCHThroughHeader = - std::string(Args.getLastArgValue(OPT_pch_through_header_EQ)); Opts.AllowPCHWithCompilerErrors = Args.hasArg(OPT_fallow_pch_with_errors, OPT_fallow_pcm_with_errors); @@ -3187,19 +3184,6 @@ static void ParsePreprocessorArgs(PreprocessorOptions &Opts, ArgList &Args, Opts.addRemappedFile(Split.first, Split.second); } - if (Arg *A = Args.getLastArg(OPT_fobjc_arc_cxxlib_EQ)) { - StringRef Name = A->getValue(); - unsigned Library = llvm::StringSwitch<unsigned>(Name) - .Case("libc++", ARCXX_libcxx) - .Case("libstdc++", ARCXX_libstdcxx) - .Case("none", ARCXX_nolib) - .Default(~0U); - if (Library == ~0U) - Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << Name; - else - Opts.ObjCXXARCStandardLibrary = (ObjCXXARCStandardLibraryKind)Library; - } - // Always avoid lexing editor placeholders when we're just running the // preprocessor as we never want to emit the // "editor placeholder in source file" error in PP only mode. |