summaryrefslogtreecommitdiffstats
path: root/lld/lib/Driver/WinLinkDriver.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2013-11-21 00:43:46 +0000
committerRui Ueyama <ruiu@google.com>2013-11-21 00:43:46 +0000
commit2a10b6401bebbea2523adef5277fb09fde75f587 (patch)
tree84d825bf44ccd41b5e2c3d4117a661fc46ec85a9 /lld/lib/Driver/WinLinkDriver.cpp
parent8c5b4be41757ef29877f796f6861afd28c8be4b8 (diff)
downloadbcm5719-llvm-2a10b6401bebbea2523adef5277fb09fde75f587.tar.gz
bcm5719-llvm-2a10b6401bebbea2523adef5277fb09fde75f587.zip
[PECOFF] Do not check if library is already added.
llvm-svn: 195289
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