Re-commit r225674: Convert other drivers to use WrapperNode.
The original commit had an issue with Mac OS dylib files. It didn't
handle fat binary dylib files correctly. This patch includes a fix.
A test for that case has already been committed in r225764.
llvm-svn: 226123
diff --git a/lld/lib/Driver/Driver.cpp b/lld/lib/Driver/Driver.cpp
index d55bc4a..4d0fe6e 100644
--- a/lld/lib/Driver/Driver.cpp
+++ b/lld/lib/Driver/Driver.cpp
@@ -49,13 +49,13 @@
   return members;
 }
 
-FileVector parseFile(LinkingContext &ctx, StringRef path, bool wholeArchive) {
+FileVector loadFile(LinkingContext &ctx, StringRef path, bool wholeArchive) {
   ErrorOr<std::unique_ptr<MemoryBuffer>> mb
       = 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().parseFile(std::move(mb.get()), files))
+  if (std::error_code ec = ctx.registry().loadFile(std::move(mb.get()), files))
     return makeErrorFile(path, ec);
   if (wholeArchive)
     return parseMemberFiles(files);