[lld] r250732 - Reduce nesting level. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 19 13:31:50 PDT 2015
Author: ruiu
Date: Mon Oct 19 15:31:49 2015
New Revision: 250732
URL: http://llvm.org/viewvc/llvm-project?rev=250732&view=rev
Log:
Reduce nesting level. NFC.
Modified:
lld/trunk/ELF/OutputSections.cpp
Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=250732&r1=250731&r2=250732&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Mon Oct 19 15:31:49 2015
@@ -140,16 +140,14 @@ template <class ELFT> void RelocationSec
OrigAddend = static_cast<const Elf_Rela &>(RI).r_addend;
uintX_t Addend;
- if (CanBePreempted) {
+ if (CanBePreempted)
Addend = OrigAddend;
- } else {
- if (Body)
- Addend = getSymVA<ELFT>(cast<ELFSymbolBody<ELFT>>(*Body)) + OrigAddend;
- else if (IsRela)
- Addend = getLocalRelTarget(File, static_cast<const Elf_Rela &>(RI));
- else
- Addend = getLocalRelTarget(File, RI);
- }
+ else if (Body)
+ Addend = getSymVA<ELFT>(cast<ELFSymbolBody<ELFT>>(*Body)) + OrigAddend;
+ else if (IsRela)
+ Addend = getLocalRelTarget(File, static_cast<const Elf_Rela &>(RI));
+ else
+ Addend = getLocalRelTarget(File, RI);
if (IsRela)
static_cast<Elf_Rela *>(P)->r_addend = Addend;
More information about the llvm-commits
mailing list