[llvm-commits] [llvm] r169396 - in /llvm/trunk: include/llvm/MC/MCInstPrinter.h lib/MC/MCInstPrinter.cpp
Benjamin Kramer
benny.kra at googlemail.com
Wed Dec 5 10:31:11 PST 2012
Author: d0k
Date: Wed Dec 5 12:31:11 2012
New Revision: 169396
URL: http://llvm.org/viewvc/llvm-project?rev=169396&view=rev
Log:
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.
Modified:
llvm/trunk/include/llvm/MC/MCInstPrinter.h
llvm/trunk/lib/MC/MCInstPrinter.cpp
Modified: llvm/trunk/include/llvm/MC/MCInstPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCInstPrinter.h?rev=169396&r1=169395&r2=169396&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCInstPrinter.h (original)
+++ llvm/trunk/include/llvm/MC/MCInstPrinter.h Wed Dec 5 12:31:11 2012
@@ -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 {
Modified: llvm/trunk/lib/MC/MCInstPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCInstPrinter.cpp?rev=169396&r1=169395&r2=169396&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCInstPrinter.cpp (original)
+++ llvm/trunk/lib/MC/MCInstPrinter.cpp Wed Dec 5 12:31:11 2012
@@ -55,7 +55,7 @@
/// 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);
}
More information about the llvm-commits
mailing list