Handle Archive::children's error proerly.

The previous code didn't make sense at all. Now an error condition
is handled with fatal(). Thanks to Mehdi for pointing out the issue.

llvm-svn: 286547
This commit is contained in:
Rui Ueyama 2016-11-11 02:09:28 +00:00
parent 432f3ef887
commit 049e045c3a
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ LinkerDriver::getArchiveMembers(MemoryBufferRef MB) {
V.push_back(MBRef);
}
if (Err)
Error(Err);
fatal("Archive::children failed: " + toString(std::move(Err)));
// Take ownership of memory buffers created for members of thin archives.
for (std::unique_ptr<MemoryBuffer> &MB : File->takeThinBuffers())