[PATCH] D53690: [llvm-objdump] Don't Crash When Using `-a` on Non-Archives (PR39402)
Xing via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 25 01:24:37 PDT 2018
Higuoxing added inline comments.
================
Comment at: tools/llvm-objdump/llvm-objdump.cpp:2408
if (Archive *a = dyn_cast<Archive>(&Binary))
DumpArchive(a);
else if (ObjectFile *o = dyn_cast<ObjectFile>(&Binary))
----------------
Here, `Archive::Child *C` will be `nullptr`
================
Comment at: tools/llvm-objdump/llvm-objdump.cpp:2410
else if (ObjectFile *o = dyn_cast<ObjectFile>(&Binary))
DumpObject(o);
else if (MachOUniversalBinary *UB = dyn_cast<MachOUniversalBinary>(&Binary))
----------------
Here, `Archive::Child *C` will be `nullptr` as well
Repository:
rL LLVM
https://reviews.llvm.org/D53690
More information about the llvm-commits
mailing list