Interleaved source printing during disassembly is a useful feature, but all the classes for it live in llvm-objdump.cpp and can't be used by the (weirdly) separate MachODumper.cpp. This patch pretty mechanically moves the needed bits (and command-line options) into a shareable header and adds the needed hooks for MachO.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Looks like this is causing test failures? Maybe you could break it down into a couple of patches, with the first being the simple moving of code, and later patches adding the new functionality for MachO?
Moving the code is a good time to address any formatting issues highlighted by clang-tidy/clang-format too.
Comment Actions
Thanks, this should now be just the NFC refactoring, with most clang-tidy/clang-format suggestions applied (I ignored the DWARF one for obvious reasons).
I'm not sure what's going on with those test failures, it works on my local Linux machine. But now that this is non-MachO that's a problem for another time.
Nit: add a new line at EOF