These are the matching changes needed to the lld project for the changes to llvm
in r252192 that changed the Archive and Child interfaces in libObject. These include
Rafael Espindola’s many suggested updates.
llvm-svn: 252193
diff --git a/lld/COFF/InputFiles.cpp b/lld/COFF/InputFiles.cpp
index bcf9a29..e819c1b 100644
--- a/lld/COFF/InputFiles.cpp
+++ b/lld/COFF/InputFiles.cpp
@@ -67,8 +67,11 @@
// Seen is a map from member files to boolean values. Initially
// all members are mapped to false, which indicates all these files
// are not read yet.
- for (const Archive::Child &Child : File->children())
+ for (auto &ChildOrErr : File->children()) {
+ error(ChildOrErr, "Failed to parse static library");
+ const Archive::Child &Child = *ChildOrErr;
Seen[Child.getChildOffset()].clear();
+ }
}
// Returns a buffer pointing to a member file containing a given symbol.