[llvm-objdump] [NFC] Factor out DisassemblerTarget class.
authorJacek Caban <jacek@codeweavers.com>
Wed, 19 Apr 2023 21:39:53 +0000 (23:39 +0200)
committerJacek Caban <jacek@codeweavers.com>
Mon, 24 Jul 2023 20:13:08 +0000 (22:13 +0200)
commit6c48f57c14dcfe2410afcb4c6778dcbb40d294b5
tree7d56c7bf1336be2ba8b36f82e238a92ff2e3fc2b
parent992fa7be3438bce61cfba7c0e0b07d9d1ddcc05b
[llvm-objdump] [NFC] Factor out DisassemblerTarget class.

This is a preparation for ARM64EC/ARM64X binaries, which may contain both ARM64
and x86_64 code in the same file. llvm-objdump already has partial support for
mixing disassemblers for ARM thumb mode support. However, for ARM64EC we can't
share MCContext, MCInstrAnalysis and PrettyPrinter instances. This patch
provides additional abstraction which makes adding mixed code support later in
the series easier.

Reviewed By: jhenderson, MaskRay
Differential Revision: https://reviews.llvm.org/D149093
llvm/tools/llvm-objdump/llvm-objdump.cpp