[lld] r326977 - Return early. NFC.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 7 17:22:30 PST 2018


Author: ruiu
Date: Wed Mar  7 17:22:30 2018
New Revision: 326977

URL: http://llvm.org/viewvc/llvm-project?rev=326977&view=rev
Log:
Return early. NFC.

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.

Modified:
    lld/trunk/ELF/InputFiles.cpp

Modified: lld/trunk/ELF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=326977&r1=326976&r2=326977&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Wed Mar  7 17:22:30 2018
@@ -1164,6 +1164,7 @@ template <class ELFT> void LazyObjFile::
       if (Sym.st_shndx != SHN_UNDEF)
         Symtab->addLazyObject<ELFT>(CHECK(Sym.getName(StringTable), this),
                                     *this);
+    return;
   }
 }
 




More information about the llvm-commits mailing list