aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/ELFObjectFile.cpp
diff options
context:
space:
mode:
authorGregory Alfonso <gfunni234@gmail.com>2023-02-16 13:20:41 -0800
committerFangrui Song <i@maskray.me>2023-02-16 13:20:41 -0800
commit956c7dca29c7dd0cbaa611278e9ab959d1090853 (patch)
tree09bad05e8ec464f42db069f80f4640786e9b2802 /llvm/lib/Object/ELFObjectFile.cpp
parent56e41fcf50283f9a76aa65eaf76f118db3bfd1ba (diff)
downloadllvm-956c7dca29c7dd0cbaa611278e9ab959d1090853.zip
llvm-956c7dca29c7dd0cbaa611278e9ab959d1090853.tar.gz
llvm-956c7dca29c7dd0cbaa611278e9ab959d1090853.tar.bz2
[Object][NFC] Remove unneeded llvm_unreachable
Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D139452
Diffstat (limited to 'llvm/lib/Object/ELFObjectFile.cpp')
-rw-r--r--llvm/lib/Object/ELFObjectFile.cpp6
1 files 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<std::vector<BBAddrMap>> ELFObjectFileBase::readBBAddrMap(
return readBBAddrMapImpl(Obj->getELFFile(), TextSectionIndex);
if (const auto *Obj = dyn_cast<ELF32BEObjectFile>(this))
return readBBAddrMapImpl(Obj->getELFFile(), TextSectionIndex);
- if (const auto *Obj = cast<ELF64BEObjectFile>(this))
- return readBBAddrMapImpl(Obj->getELFFile(), TextSectionIndex);
- else
- llvm_unreachable("Unsupported binary format");
+ return readBBAddrMapImpl(cast<ELF64BEObjectFile>(this)->getELFFile(),
+ TextSectionIndex);
}