diff --git a/llvm/include/llvm/MC/MCInstPrinter.h b/llvm/include/llvm/MC/MCInstPrinter.h index d20d8d2c8367..a18cbd94bbbf 100644 --- a/llvm/include/llvm/MC/MCInstPrinter.h +++ b/llvm/include/llvm/MC/MCInstPrinter.h @@ -10,6 +10,7 @@ #ifndef LLVM_MC_MCINSTPRINTER_H #define LLVM_MC_MCINSTPRINTER_H +#include "llvm/Support/DataTypes.h" #include "llvm/Support/Format.h" namespace llvm { diff --git a/llvm/lib/MC/MCInstPrinter.cpp b/llvm/lib/MC/MCInstPrinter.cpp index 7efb3f0ef313..73f30ffb52a0 100644 --- a/llvm/lib/MC/MCInstPrinter.cpp +++ b/llvm/lib/MC/MCInstPrinter.cpp @@ -55,7 +55,7 @@ StringRef MCInstPrinter::markup(StringRef a, StringRef b) const { /// Utility function to print immediates in decimal or hex. format_object1 MCInstPrinter::formatImm(const int64_t Value) const { if (getPrintImmHex()) - return format("0x%llx", Value); + return format("0x%" PRIx64, Value); else - return format("%lld", Value); + return format("%" PRId64, Value); }