Return early. NFC.
authorRui Ueyama <ruiu@google.com>
Thu, 8 Mar 2018 01:22:30 +0000 (01:22 +0000)
committerRui Ueyama <ruiu@google.com>
Thu, 8 Mar 2018 01:22:30 +0000 (01:22 +0000)
We don't need to handle an object file having more than one symbol table,
so as soon as we find the first one, we can process it and then return
from the function.

llvm-svn: 326977

lld/ELF/InputFiles.cpp

index e7c55f0..9028ea5 100644 (file)
@@ -1164,6 +1164,7 @@ template <class ELFT> void LazyObjFile::addElfSymbols() {
       if (Sym.st_shndx != SHN_UNDEF)
         Symtab->addLazyObject<ELFT>(CHECK(Sym.getName(StringTable), this),
                                     *this);
+    return;
   }
 }