Replace isa+cast with dyn_cast. NFC.

llvm-svn: 247691
This commit is contained in:
Rafael Espindola 2015-09-15 14:08:11 +00:00
parent f304d5eb2b
commit e6451d9e74
1 changed files with 3 additions and 2 deletions

View File

@ -478,12 +478,13 @@ template <class ELFT> void OutputSection<ELFT>::writeTo(uint8_t *Buf) {
if (!Body)
continue;
// Skip unsupported for now.
if (!isa<DefinedRegular<ELFT>>(Body))
auto *DR = dyn_cast<DefinedRegular<ELFT>>(Body);
if (!DR)
continue;
uintX_t Offset = RI.r_offset;
uint32_t Type = RI.getType(EObj->isMips64EL());
uintX_t P = this->getVA() + C->getOutputSectionOff();
uintX_t SymVA = getSymVA<ELFT>(cast<DefinedRegular<ELFT>>(Body));
uintX_t SymVA = getSymVA<ELFT>(DR);
uint8_t *Location = Base + Offset;
switch (Type) {
case llvm::ELF::R_X86_64_PC32: