From 806f85a1c602e8e4c739ac743d645d2369b46a5c Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Sun, 23 Jul 2017 16:31:47 +0000 Subject: [PATCH] Remove Driver::UseStdLib. All but one place are checking options::OPT_nostdlib instead of looking at this field, so convert that one other place to doing that as well. No behavior change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308848 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Driver/Driver.h | 3 --- lib/Driver/Driver.cpp | 4 +--- lib/Driver/ToolChains/NetBSD.cpp | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/include/clang/Driver/Driver.h b/include/clang/Driver/Driver.h index 5a087eea1b..86b785ef53 100644 --- a/include/clang/Driver/Driver.h +++ b/include/clang/Driver/Driver.h @@ -148,9 +148,6 @@ public: /// Dynamic loader prefix, if present std::string DyldPrefix; - /// If the standard library is used - bool UseStdLib; - /// Driver title to use with help. std::string DriverTitle; diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index 98b0bdaf11..361d45f90a 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -87,7 +87,7 @@ Driver::Driver(StringRef ClangExecutable, StringRef DefaultTargetTriple, : Opts(createDriverOptTable()), Diags(Diags), VFS(std::move(VFS)), Mode(GCCMode), SaveTemps(SaveTempsNone), BitcodeEmbed(EmbedNone), LTOMode(LTOK_None), ClangExecutable(ClangExecutable), - SysRoot(DEFAULT_SYSROOT), UseStdLib(true), + SysRoot(DEFAULT_SYSROOT), DriverTitle("clang LLVM compiler"), CCPrintOptionsFilename(nullptr), CCPrintHeadersFilename(nullptr), CCLogDiagnosticsFilename(nullptr), CCCPrintBindings(false), CCPrintHeaders(false), CCLogDiagnostics(false), @@ -678,8 +678,6 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { SysRoot = A->getValue(); if (const Arg *A = Args.getLastArg(options::OPT__dyld_prefix_EQ)) DyldPrefix = A->getValue(); - if (Args.hasArg(options::OPT_nostdlib)) - UseStdLib = false; if (const Arg *A = Args.getLastArg(options::OPT_resource_dir)) ResourceDir = A->getValue(); diff --git a/lib/Driver/ToolChains/NetBSD.cpp b/lib/Driver/ToolChains/NetBSD.cpp index a1a3108cb2..e89ee377e7 100644 --- a/lib/Driver/ToolChains/NetBSD.cpp +++ b/lib/Driver/ToolChains/NetBSD.cpp @@ -324,7 +324,7 @@ void netbsd::Linker::ConstructJob(Compilation &C, const JobAction &JA, NetBSD::NetBSD(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) : Generic_ELF(D, Triple, Args) { - if (getDriver().UseStdLib) { + if (!Args.hasArg(options::OPT_nostdlib)) { // When targeting a 32-bit platform, try the special directory used on // 64-bit hosts, and only fall back to the main library directory if that // doesn't work. -- 2.50.1