From e6451d9e741bcac0529214850c9b35bf4a3b393b Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 15 Sep 2015 14:08:11 +0000 Subject: [PATCH] Replace isa+cast with dyn_cast. NFC. llvm-svn: 247691 --- lld/ELF/Writer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index b4d5ec2fb8ba..8c4503eed3fe 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -478,12 +478,13 @@ template void OutputSection::writeTo(uint8_t *Buf) { if (!Body) continue; // Skip unsupported for now. - if (!isa>(Body)) + auto *DR = dyn_cast>(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(cast>(Body)); + uintX_t SymVA = getSymVA(DR); uint8_t *Location = Base + Offset; switch (Type) { case llvm::ELF::R_X86_64_PC32: