Try to unbreak the build on hosts that don't transitively pull in a definition for...
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 5 Dec 2012 18:31:11 +0000 (18:31 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 5 Dec 2012 18:31:11 +0000 (18:31 +0000)
Also use the portable (ugly) format string macros, for MSVC compatibility.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169396 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCInstPrinter.h
lib/MC/MCInstPrinter.cpp

index d20d8d2c8367e54999f9f9c979a94bde914efea3..a18cbd94bbbf1a1a0933e31d4b11dd8c2d10f395 100644 (file)
@@ -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 {
index 7efb3f0ef31348261a0f5631d8c30a46da191b0d..73f30ffb52a02c0493f31709697e83766786b07f 100644 (file)
@@ -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);
 }