diff options
author | Simon Atanasyan <simon@atanasyan.com> | 2015-02-26 20:09:42 +0000 |
---|---|---|
committer | Simon Atanasyan <simon@atanasyan.com> | 2015-02-26 20:09:42 +0000 |
commit | 27967c843be0f1215c70fe0970793070e8cdeea3 (patch) | |
tree | 86660942448369c2def8277b1619b0adcec0e33e | |
parent | 009c28a231663fe737773f1d43a516a96d384f91 (diff) | |
download | llvm-27967c843be0f1215c70fe0970793070e8cdeea3.zip llvm-27967c843be0f1215c70fe0970793070e8cdeea3.tar.gz llvm-27967c843be0f1215c70fe0970793070e8cdeea3.tar.bz2 |
[ELF] Reduce the code indentation
No functional changes.
llvm-svn: 230678
-rw-r--r-- | lld/lib/ReaderWriter/ELF/ELFFile.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lld/lib/ReaderWriter/ELF/ELFFile.h b/lld/lib/ReaderWriter/ELF/ELFFile.h index 869efe1..22891c2 100644 --- a/lld/lib/ReaderWriter/ELF/ELFFile.h +++ b/lld/lib/ReaderWriter/ELF/ELFFile.h @@ -1089,18 +1089,17 @@ void ELFFile<ELFT>::updateReferenceForMergeStringAccess(ELFReference<ELFT> *ref, 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 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 (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)) updateReferenceForMergeStringAccess(ri, symbol, shdr); - } + else + ri->setTarget(findAtom(findSymbolForReference(ri), symbol)); } } |