diff options
Diffstat (limited to 'lld/ELF/InputFiles.cpp')
| -rw-r--r-- | lld/ELF/InputFiles.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index ed6bb838181..364b3883612 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -308,7 +308,10 @@ std::vector<MemoryBufferRef> ArchiveFile::getMembers() { File = openArchive(MB); std::vector<MemoryBufferRef> Result; - for (const Archive::Child &Child : File->children()) { + for (auto &ChildOrErr : File->children()) { + error(ChildOrErr, + "Could not get the child of the archive " + File->getFileName()); + const Archive::Child Child(*ChildOrErr); ErrorOr<MemoryBufferRef> MbOrErr = Child.getMemoryBufferRef(); error(MbOrErr, "Could not get the buffer for a child of the archive " + File->getFileName()); |

