summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-03-13 20:34:34 +0000
committerRui Ueyama <ruiu@google.com>2016-03-13 20:34:34 +0000
commit54945f692b7c0ce232186171148fd6bb29d61137 (patch)
treeeaedc4b381b92c2e487d802cc67dcd23f5879f40
parenta0752a5b25da926cbe95529f84bc8640a60a3d09 (diff)
downloadbcm5719-llvm-54945f692b7c0ce232186171148fd6bb29d61137.tar.gz
bcm5719-llvm-54945f692b7c0ce232186171148fd6bb29d61137.zip
Simplify. NFC.
llvm-svn: 263391
-rw-r--r--lld/ELF/InputSection.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp
index 993f0cb5353..667072f7dce 100644
--- a/lld/ELF/InputSection.cpp
+++ b/lld/ELF/InputSection.cpp
@@ -78,11 +78,9 @@ InputSectionBase<ELFT>::getRelocTarget(const Elf_Rel &Rel) const {
// 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;
}
OpenPOWER on IntegriCloud