In order to support inline asm with memory constraints, AsmPrinter::PrintAsmMemOperand needs to be implemented, which has lots of overlaps with MCInstPrinter especially on the format of complex addressing modes. This patch factors out the common printing logics from MCInstPrinter into a separate class inherited by both AsmPrinter and MCInstPrinter, in which the derived classes only need to provide primitives like printOperand and printDisp.
This change is basically NFC. See D143529 for changes on AsmPrinter