[lld] r230678 - [ELF] Reduce the code indentation
Simon Atanasyan
simon at atanasyan.com
Thu Feb 26 12:09:42 PST 2015
Author: atanasyan
Date: Thu Feb 26 14:09:42 2015
New Revision: 230678
URL: http://llvm.org/viewvc/llvm-project?rev=230678&view=rev
Log:
[ELF] Reduce the code indentation
No functional changes.
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=230678&r1=230677&r2=230678&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFFile.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFFile.h Thu Feb 26 14:09:42 2015
@@ -1089,18 +1089,17 @@ void ELFFile<ELFT>::updateReferenceForMe
template <class ELFT> void ELFFile<ELFT>::updateReferences() {
for (auto &ri : _references) {
- if (ri->kindNamespace() == lld::Reference::KindNamespace::ELF) {
- const Elf_Sym *symbol = _objFile->getSymbol(ri->targetSymbolIndex());
- const Elf_Shdr *shdr = _objFile->getSection(symbol);
+ if (ri->kindNamespace() != lld::Reference::KindNamespace::ELF)
+ continue;
+ const Elf_Sym *symbol = _objFile->getSymbol(ri->targetSymbolIndex());
+ const Elf_Shdr *shdr = _objFile->getSection(symbol);
- // If the atom is not in mergeable string section, the target atom is
- // simply that atom.
- if (!isMergeableStringSection(shdr)) {
- ri->setTarget(findAtom(findSymbolForReference(ri), symbol));
- continue;
- }
+ // If the atom is not in mergeable string section, the target atom is
+ // simply that atom.
+ if (isMergeableStringSection(shdr))
updateReferenceForMergeStringAccess(ri, symbol, shdr);
- }
+ else
+ ri->setTarget(findAtom(findSymbolForReference(ri), symbol));
}
}
More information about the llvm-commits
mailing list