diff options
author | Rui Ueyama <ruiu@google.com> | 2016-03-13 20:34:34 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2016-03-13 20:34:34 +0000 |
commit | 54945f692b7c0ce232186171148fd6bb29d61137 (patch) | |
tree | eaedc4b381b92c2e487d802cc67dcd23f5879f40 | |
parent | a0752a5b25da926cbe95529f84bc8640a60a3d09 (diff) | |
download | bcm5719-llvm-54945f692b7c0ce232186171148fd6bb29d61137.tar.gz bcm5719-llvm-54945f692b7c0ce232186171148fd6bb29d61137.zip |
Simplify. NFC.
llvm-svn: 263391
-rw-r--r-- | lld/ELF/InputSection.cpp | 6 |
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; } |