From 956c7dca29c7dd0cbaa611278e9ab959d1090853 Mon Sep 17 00:00:00 2001 From: Gregory Alfonso Date: Thu, 16 Feb 2023 13:20:41 -0800 Subject: [PATCH] [Object][NFC] Remove unneeded llvm_unreachable Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D139452 --- llvm/lib/Object/ELFObjectFile.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/llvm/lib/Object/ELFObjectFile.cpp b/llvm/lib/Object/ELFObjectFile.cpp index 4ce2403..2cbfd8a 100644 --- a/llvm/lib/Object/ELFObjectFile.cpp +++ b/llvm/lib/Object/ELFObjectFile.cpp @@ -783,8 +783,6 @@ Expected> ELFObjectFileBase::readBBAddrMap( 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); } -- 2.7.4