diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-12-05 18:31:11 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-12-05 18:31:11 +0000 |
commit | d9791538156702ac1f92ca2984a8ab536deda4f1 (patch) | |
tree | 16bfcc14cb867765ede3b100a2597b08aca21841 | |
parent | b47a4f7a0a780eb256cf090e01c5a002fff6684e (diff) | |
download | llvm-d9791538156702ac1f92ca2984a8ab536deda4f1.tar.gz llvm-d9791538156702ac1f92ca2984a8ab536deda4f1.tar.bz2 llvm-d9791538156702ac1f92ca2984a8ab536deda4f1.tar.xz |
Try to unbreak the build on hosts that don't transitively pull in a definition for int64_t.
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
-rw-r--r-- | include/llvm/MC/MCInstPrinter.h | 1 | ||||
-rw-r--r-- | lib/MC/MCInstPrinter.cpp | 4 |
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); } |