[lld] r286547 - Handle Archive::children's error proerly.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 10 18:09:28 PST 2016
Author: ruiu
Date: Thu Nov 10 20:09:28 2016
New Revision: 286547
URL: http://llvm.org/viewvc/llvm-project?rev=286547&view=rev
Log:
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.
Modified:
lld/trunk/ELF/Driver.cpp
Modified: lld/trunk/ELF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=286547&r1=286546&r2=286547&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Thu Nov 10 20:09:28 2016
@@ -113,7 +113,7 @@ LinkerDriver::getArchiveMembers(MemoryBu
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())
More information about the llvm-commits
mailing list