diff --git a/llvm/lib/Object/ELFObjectFile.cpp b/llvm/lib/Object/ELFObjectFile.cpp --- a/llvm/lib/Object/ELFObjectFile.cpp +++ b/llvm/lib/Object/ELFObjectFile.cpp @@ -783,8 +783,6 @@ return readBBAddrMapImpl(Obj->getELFFile(), TextSectionIndex); if (const auto *Obj = dyn_cast(this)) return readBBAddrMapImpl(Obj->getELFFile(), TextSectionIndex); - if (const auto *Obj = cast(this)) - return readBBAddrMapImpl(Obj->getELFFile(), TextSectionIndex); - else - llvm_unreachable("Unsupported binary format"); + return readBBAddrMapImpl(cast(this)->getELFFile(), + TextSectionIndex); }