cast<> can cause assertion failure, so the else routine is unreachable.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 25044 Build 25043: arc lint + arc unit
Event Timeline
Comment Actions
Seems there are some legacy codes, like:
if (auto *ELF32LE = dyn_cast<ELF32LEObjectFile>(Obj)) return getRelocationValueString(ELF32LE, Rel, Result); if (auto *ELF64LE = dyn_cast<ELF64LEObjectFile>(Obj)) return getRelocationValueString(ELF64LE, Rel, Result); if (auto *ELF32BE = dyn_cast<ELF32BEObjectFile>(Obj)) return getRelocationValueString(ELF32BE, Rel, Result); auto *ELF64BE = cast<ELF64BEObjectFile>(Obj); return getRelocationValueString(ELF64BE, Rel, Result);