summaryrefslogtreecommitdiffstats
path: root/lld/lib/Driver/WinLinkDriver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/lib/Driver/WinLinkDriver.cpp')
-rw-r--r--lld/lib/Driver/WinLinkDriver.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/lld/lib/Driver/WinLinkDriver.cpp b/lld/lib/Driver/WinLinkDriver.cpp
index 5ca0fa5925a..7f71a3c97b9 100644
--- a/lld/lib/Driver/WinLinkDriver.cpp
+++ b/lld/lib/Driver/WinLinkDriver.cpp
@@ -910,15 +910,11 @@ WinLinkDriver::parse(int argc, const char *argv[], PECOFFLinkingContext &ctx,
// Add the libraries specified by /defaultlib unless they are already added
// nor blacklisted by /nodefaultlib.
- if (!ctx.getNoDefaultLibAll()) {
- for (const StringRef path : defaultLibs) {
- if (!ctx.hasNoDefaultLib(path) && !ctx.hasDefaultLib(path)) {
+ if (!ctx.getNoDefaultLibAll())
+ for (const StringRef path : defaultLibs)
+ if (!ctx.hasNoDefaultLib(path))
inputElements.push_back(std::unique_ptr<InputElement>(
new PECOFFLibraryNode(ctx, path)));
- ctx.addDefaultLib(path);
- }
- }
- }
if (inputElements.empty() && !isReadingDirectiveSection) {
diagnostics << "No input files\n";
OpenPOWER on IntegriCloud