+namespace {
+class PrettyPrinter {
+public:
+ virtual void printInst(MCInstPrinter &IP, const MCInst *MI, bool ShowRawInsn,
+ ArrayRef<uint8_t> Bytes, uint64_t Address,
+ raw_ostream &OS, StringRef Annot,
+ MCSubtargetInfo const &STI) {
+ outs() << format("%8" PRIx64 ":", Address);
+ if (!NoShowRawInsn) {
+ outs() << "\t";
+ dumpBytes(Bytes, outs());
+ }
+ IP.printInst(MI, outs(), "", STI);
+ }
+};
+PrettyPrinter PrettyPrinterInst;
+PrettyPrinter &selectPrettyPrinter(Triple const &Triple, MCInstPrinter &IP) {
+ switch(Triple.getArch()) {
+ default:
+ return PrettyPrinterInst;
+ }
+}
+}
+