[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
Sat Oct 27 21:27:32 PDT 2018


Higuoxing added inline comments.


================
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))
----------------
MaskRay wrote:
> Higuoxing wrote:
> > Here, `Archive::Child *C` will be `nullptr` as well
> `DumpObject` has only two call sites. Do you think it is better deleting its default arguments and passing `nullptr` explicitly?
Thanks  a lot, I agree with you :)


https://reviews.llvm.org/D53690





More information about the llvm-commits mailing list