[PATCH] D54575: [llvm-objdump] Replace cast<> by dyn_cast<>
Xing via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 15 05:12:53 PST 2018
Higuoxing added a comment.
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);
Repository:
rL LLVM
https://reviews.llvm.org/D54575
More information about the llvm-commits
mailing list