summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/MC/MCInstPrinter.h1
-rw-r--r--lib/MC/MCInstPrinter.cpp4
2 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/MC/MCInstPrinter.h b/include/llvm/MC/MCInstPrinter.h
index d20d8d2c83..a18cbd94bb 100644
--- a/include/llvm/MC/MCInstPrinter.h
+++ b/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/lib/MC/MCInstPrinter.cpp b/lib/MC/MCInstPrinter.cpp
index 7efb3f0ef3..73f30ffb52 100644
--- a/lib/MC/MCInstPrinter.cpp
+++ b/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<int64_t> 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);
}