diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2017-05-31 19:26:37 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2017-05-31 19:26:37 +0000 |
| commit | 0dc251076207c749bb26ef33b70d5c0057cb3776 (patch) | |
| tree | 889a2fd660779d33a59225ee90b4e97c420a3f17 | |
| parent | 5fbdd17714e2b0ab6974787c43bf1758ea451d78 (diff) | |
| download | bcm5719-llvm-0dc251076207c749bb26ef33b70d5c0057cb3776.tar.gz bcm5719-llvm-0dc251076207c749bb26ef33b70d5c0057cb3776.zip | |
Simplify. NFC.
llvm-svn: 304330
| -rw-r--r-- | lld/ELF/SyntheticSections.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index 93e00cda6f2..be41192017f 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -765,8 +765,7 @@ static uint64_t getMipsPageCount(uint64_t Size) { uint64_t MipsGotSection::getPageEntryOffset(const SymbolBody &B, int64_t Addend) const { - const OutputSection *OutSec = - cast<DefinedRegular>(&B)->Section->getOutputSection(); + const OutputSection *OutSec = B.getOutputSection(); uint64_t SecAddr = getMipsPageAddr(OutSec->Addr); uint64_t SymAddr = getMipsPageAddr(B.getVA(Addend)); uint64_t Index = PageIndexMap.lookup(OutSec) + (SymAddr - SecAddr) / 0xffff; @@ -1343,8 +1342,7 @@ size_t SymbolTableBaseSection::getSymbolIndex(SymbolBody *Body) { // This is used for -r, so we have to handle multiple section // symbols being combined. if (Body->Type == STT_SECTION && E.Symbol->Type == STT_SECTION) - return cast<DefinedRegular>(Body)->Section->getOutputSection() == - cast<DefinedRegular>(E.Symbol)->Section->getOutputSection(); + return Body->getOutputSection() == E.Symbol->getOutputSection(); return false; }); if (I == Symbols.end()) |

