diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2020-12-16 13:28:28 +0100 |
---|---|---|
committer | Jan Svoboda <jan_svoboda@apple.com> | 2020-12-18 09:30:32 +0100 |
commit | f4511aec2bf482f2ae5bbd14138a229b72c41c80 (patch) | |
tree | 558d382445180fbe46498f6fe9515aee7e0dc65c /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 2d9ae1d217890639518252ee1f39c9cc759749ef (diff) | |
download | llvm-f4511aec2bf482f2ae5bbd14138a229b72c41c80.zip llvm-f4511aec2bf482f2ae5bbd14138a229b72c41c80.tar.gz llvm-f4511aec2bf482f2ae5bbd14138a229b72c41c80.tar.bz2 |
[clang][cli] Port HeaderSearch simple string options to new option parsing system
Depends on D84669
Reviewed By: Bigcheese
Original patch by Daniel Grumberg.
Differential Revision: https://reviews.llvm.org/D84670
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index d2b590f..f7bb230 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -2028,10 +2028,8 @@ std::string CompilerInvocation::GetResourcesPath(const char *Argv0, static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args, const std::string &WorkingDir) { - Opts.Sysroot = std::string(Args.getLastArgValue(OPT_isysroot, "/")); if (const Arg *A = Args.getLastArg(OPT_stdlib_EQ)) Opts.UseLibcxx = (strcmp(A->getValue(), "libc++") == 0); - Opts.ResourceDir = std::string(Args.getLastArgValue(OPT_resource_dir)); // Canonicalize -fmodules-cache-path before storing it. SmallString<128> P(Args.getLastArgValue(OPT_fmodules_cache_path)); @@ -2044,8 +2042,6 @@ static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args, llvm::sys::path::remove_dots(P); Opts.ModuleCachePath = std::string(P.str()); - Opts.ModuleUserBuildPath = - std::string(Args.getLastArgValue(OPT_fmodules_user_build_path)); // Only the -fmodule-file=<name>=<file> form. for (const auto *A : Args.filtered(OPT_fmodule_file)) { StringRef Val = A->getValue(); @@ -2057,14 +2053,6 @@ static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args, } for (const auto *A : Args.filtered(OPT_fprebuilt_module_path)) Opts.AddPrebuiltModulePath(A->getValue()); - Opts.ModuleCachePruneInterval = - getLastArgIntValue(Args, OPT_fmodules_prune_interval, 7 * 24 * 60 * 60); - Opts.ModuleCachePruneAfter = - getLastArgIntValue(Args, OPT_fmodules_prune_after, 31 * 24 * 60 * 60); - Opts.BuildSessionTimestamp = - getLastArgUInt64Value(Args, OPT_fbuild_session_timestamp, 0); - if (const Arg *A = Args.getLastArg(OPT_fmodule_format_EQ)) - Opts.ModuleFormat = A->getValue(); for (const auto *A : Args.filtered(OPT_fmodules_ignore_macro)) { StringRef MacroDef = A->getValue(); |