[lld] r313667 - Simplify. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 19 13:28:03 PDT 2017
Author: ruiu
Date: Tue Sep 19 13:28:03 2017
New Revision: 313667
URL: http://llvm.org/viewvc/llvm-project?rev=313667&view=rev
Log:
Simplify. NFC.
Modified:
lld/trunk/ELF/SyntheticSections.cpp
Modified: lld/trunk/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=313667&r1=313666&r2=313667&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.cpp (original)
+++ lld/trunk/ELF/SyntheticSections.cpp Tue Sep 19 13:28:03 2017
@@ -503,14 +503,12 @@ void EhFrameSection<ELFT>::addSection(In
if (Sec->Pieces.empty())
return;
- if (Sec->NumRelocations) {
- if (Sec->AreRelocsRela)
- addSectionAux(Sec, Sec->template relas<ELFT>());
- else
- addSectionAux(Sec, Sec->template rels<ELFT>());
- return;
- }
- addSectionAux(Sec, makeArrayRef<Elf_Rela>(nullptr, nullptr));
+ if (Sec->NumRelocations == 0)
+ addSectionAux(Sec, makeArrayRef<Elf_Rela>(nullptr, nullptr));
+ else if (Sec->AreRelocsRela)
+ addSectionAux(Sec, Sec->template relas<ELFT>());
+ else
+ addSectionAux(Sec, Sec->template rels<ELFT>());
}
template <class ELFT>
More information about the llvm-commits
mailing list