@@ -2169,12 +2169,8 @@ void ArchiveFile::addLazySymbols() {
21692169 // Check `seen` but don't insert so a future eager load can still happen.
21702170 if (seen.contains (c.getChildOffset ()))
21712171 continue ;
2172- if (!seenLazy.insert (c.getChildOffset ()).second ) {
2172+ if (!seenLazy.insert (c.getChildOffset ()).second )
21732173 continue ;
2174- }
2175- // First check seen.
2176- // Then, write to and check seenLazy
2177- // Then, get the file, check for error, and add it to inputs.
21782174 auto file = childToObjectFile (c, /* lazy=*/ true );
21792175 if (!file)
21802176 error (toString (this ) +
@@ -2235,8 +2231,7 @@ loadArchiveMember(MemoryBufferRef mb, uint32_t modTime, StringRef archiveName,
22352231 }
22362232}
22372233
2238- Error ArchiveFile::fetch (const object::Archive::Child &c, StringRef reason,
2239- bool lazy) {
2234+ Error ArchiveFile::fetch (const object::Archive::Child &c, StringRef reason) {
22402235 if (!seen.insert (c.getChildOffset ()).second )
22412236 return Error::success ();
22422237 auto file = childToObjectFile (c, /* lazy=*/ false );
@@ -2277,10 +2272,8 @@ ArchiveFile::childToObjectFile(const llvm::object::Archive::Child &c,
22772272 if (!modTime)
22782273 return modTime.takeError ();
22792274
2280- Expected<InputFile *> file =
2281- loadArchiveMember (*mb, toTimeT (*modTime), getName (), c.getChildOffset (),
2282- forceHidden, compatArch, lazy);
2283- return file;
2275+ return loadArchiveMember (*mb, toTimeT (*modTime), getName (),
2276+ c.getChildOffset (), forceHidden, compatArch, lazy);
22842277}
22852278
22862279static macho::Symbol *createBitcodeSymbol (const lto::InputFile::Symbol &objSym,
0 commit comments