[lld] r263391 - Simplify. NFC.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 13 13:34:35 PDT 2016


Author: ruiu
Date: Sun Mar 13 15:34:34 2016
New Revision: 263391

URL: http://llvm.org/viewvc/llvm-project?rev=263391&view=rev
Log:
Simplify. NFC.

Modified:
    lld/trunk/ELF/InputSection.cpp

Modified: lld/trunk/ELF/InputSection.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.cpp?rev=263391&r1=263390&r2=263391&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.cpp (original)
+++ lld/trunk/ELF/InputSection.cpp Sun Mar 13 15:34:34 2016
@@ -78,11 +78,9 @@ InputSectionBase<ELFT>::getRelocTarget(c
   // Global symbol
   uint32_t SymIndex = Rel.getSymbol(Config->Mips64EL);
   SymbolBody &B = File->getSymbolBody(SymIndex).repl();
-  InputSectionBase<ELFT> *S = nullptr;
   if (auto *D = dyn_cast<DefinedRegular<ELFT>>(&B))
-    S = D->Section;
-  if (S)
-    return S->Repl;
+    if (D->Section)
+      return D->Section->Repl;
   return nullptr;
 }
 




More information about the llvm-commits mailing list