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.

llvm-svn: 308848
This commit is contained in:
Nico Weber 2017-07-23 16:31:47 +00:00
parent 0e9e0796f4
commit e0c3f90687
3 changed files with 2 additions and 7 deletions

View File

@ -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;

View File

@ -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<const char *> 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();

View File

@ -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.