[llvm-commits] [llvm] r169396 - in /llvm/trunk: include/llvm/MC/MCInstPrinter.h lib/MC/MCInstPrinter.cpp

Kevin Enderby enderby at apple.com
Wed Dec 5 10:38:44 PST 2012


Thanks Ben!  I was madly trying to come up with a correct fix.

Kev

On Dec 5, 2012, at 10:31 AM, Benjamin Kramer wrote:

> 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);
> }
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list