[lld] r234278 - Use early continue.
Rui Ueyama
ruiu at google.com
Mon Apr 6 19:20:33 PDT 2015
Author: ruiu
Date: Mon Apr 6 21:20:33 2015
New Revision: 234278
URL: http://llvm.org/viewvc/llvm-project?rev=234278&view=rev
Log:
Use early continue.
Modified:
lld/trunk/lib/ReaderWriter/ELF/ELFFile.h
Modified: lld/trunk/lib/ReaderWriter/ELF/ELFFile.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFFile.h?rev=234278&r1=234277&r2=234278&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFFile.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFFile.h Mon Apr 6 21:20:33 2015
@@ -746,16 +746,16 @@ template <class ELFT> std::error_code EL
// merged away as well as these symbols have to be part of symbol
// resolution
if (isMergeableStringSection(section)) {
- if (symbol->getBinding() == llvm::ELF::STB_GLOBAL) {
- ELFDefinedAtom<ELFT> *atom = createDefinedAtom(
- symbolName, *sectionName, &**si, section, symbolData,
- _references.size(), _references.size(), _references);
- atom->setOrdinal(++_ordinal);
- if (addAtoms)
- _definedAtoms._atoms.push_back(atom);
- else
- atomsForSection[*sectionName].push_back(atom);
- }
+ if (symbol->getBinding() != llvm::ELF::STB_GLOBAL)
+ continue;
+ ELFDefinedAtom<ELFT> *atom = createDefinedAtom(
+ symbolName, *sectionName, &**si, section, symbolData,
+ _references.size(), _references.size(), _references);
+ atom->setOrdinal(++_ordinal);
+ if (addAtoms)
+ _definedAtoms._atoms.push_back(atom);
+ else
+ atomsForSection[*sectionName].push_back(atom);
continue;
}
More information about the llvm-commits
mailing list