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, 4 insertions, 6 deletions
diff --git a/lld/lib/Driver/WinLinkDriver.cpp b/lld/lib/Driver/WinLinkDriver.cpp
index dc6cc79a9dc..2d98c9fe205 100644
--- a/lld/lib/Driver/WinLinkDriver.cpp
+++ b/lld/lib/Driver/WinLinkDriver.cpp
@@ -781,7 +781,7 @@ static bool hasLibrary(const PECOFFLinkingContext &ctx, FileNode *fileNode) {
ErrorOr<StringRef> path = fileNode->getPath(ctx);
if (!path)
return false;
- for (std::unique_ptr<InputElement> &p : ctx.getLibraryGroup()->elements())
+ for (std::unique_ptr<InputElement> &p : ctx.getInputGraph().inputElements())
if (auto *f = dyn_cast<FileNode>(p.get()))
if (*path == *f->getPath(ctx))
return true;
@@ -1397,10 +1397,8 @@ bool WinLinkDriver::parse(int argc, const char *argv[],
ctx.setEntryNode(entry.get());
ctx.getInputGraph().addInputElement(std::move(entry));
- // The container for all library files.
- std::unique_ptr<Group> group(new PECOFFGroup(ctx));
- ctx.setLibraryGroup(group.get());
- ctx.getInputGraph().addInputElement(std::move(group));
+ // Add a group-end marker.
+ ctx.getInputGraph().addInputElement(llvm::make_unique<GroupEnd>(0));
}
// Add the library files to the library group.
@@ -1409,7 +1407,7 @@ bool WinLinkDriver::parse(int argc, const char *argv[],
if (isReadingDirectiveSection)
if (lib->parse(ctx, diag))
return false;
- ctx.getLibraryGroup()->addFile(std::move(lib));
+ ctx.addLibraryFile(std::move(lib));
}
}
OpenPOWER on IntegriCloud