@@ -1010,14 +1010,14 @@ void ArchiveFile::parse() {
10101010}
10111011
10121012// Returns a buffer pointing to a member file containing a given symbol.
1013- InputFile * ArchiveFile::fetch (const Archive::Symbol &Sym) {
1013+ void ArchiveFile::fetch (const Archive::Symbol &Sym) {
10141014 Archive::Child C =
10151015 CHECK (Sym.getMember (), toString (this ) +
10161016 " : could not get the member for symbol " +
10171017 Sym.getName ());
10181018
10191019 if (!Seen.insert (C.getChildOffset ()).second )
1020- return nullptr ;
1020+ return ;
10211021
10221022 MemoryBufferRef MB =
10231023 CHECK (C.getMemoryBufferRef (),
@@ -1031,7 +1031,7 @@ InputFile *ArchiveFile::fetch(const Archive::Symbol &Sym) {
10311031 InputFile *File = createObjectFile (
10321032 MB, getName (), C.getParent ()->isThin () ? 0 : C.getChildOffset ());
10331033 File->GroupId = GroupId;
1034- return File;
1034+ parseFile ( File) ;
10351035}
10361036
10371037unsigned SharedFile::VernauxNum;
@@ -1469,9 +1469,9 @@ InputFile *elf::createSharedFile(MemoryBufferRef MB, StringRef DefaultSoName) {
14691469 return F;
14701470}
14711471
1472- InputFile * LazyObjFile::fetch () {
1472+ void LazyObjFile::fetch () {
14731473 if (MB.getBuffer ().empty ())
1474- return nullptr ;
1474+ return ;
14751475
14761476 InputFile *File = createObjectFile (MB, ArchiveName, OffsetInArchive);
14771477 File->GroupId = GroupId;
@@ -1481,7 +1481,8 @@ InputFile *LazyObjFile::fetch() {
14811481 // Copy symbol vector so that the new InputFile doesn't have to
14821482 // insert the same defined symbols to the symbol table again.
14831483 File->Symbols = std::move (Symbols);
1484- return File;
1484+
1485+ parseFile (File);
14851486}
14861487
14871488template <class ELFT > void LazyObjFile::parse () {
0 commit comments