summaryrefslogtreecommitdiffstats
path: root/lld/lib/Driver/Driver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/lib/Driver/Driver.cpp')
-rw-r--r--lld/lib/Driver/Driver.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lld/lib/Driver/Driver.cpp b/lld/lib/Driver/Driver.cpp
index 233ecd49058..1314d91514c 100644
--- a/lld/lib/Driver/Driver.cpp
+++ b/lld/lib/Driver/Driver.cpp
@@ -54,9 +54,11 @@ FileVector loadFile(LinkingContext &ctx, StringRef path, bool wholeArchive) {
= MemoryBuffer::getFileOrSTDIN(path);
if (std::error_code ec = mb.getError())
return makeErrorFile(path, ec);
- std::vector<std::unique_ptr<File>> files;
- if (std::error_code ec = ctx.registry().loadFile(std::move(mb.get()), files))
+ std::unique_ptr<File> file;
+ if (std::error_code ec = ctx.registry().loadFile(std::move(mb.get()), file))
return makeErrorFile(path, ec);
+ std::vector<std::unique_ptr<File>> files;
+ files.push_back(std::move(file));
if (wholeArchive)
return parseMemberFiles(files);
return files;
OpenPOWER on IntegriCloud