[llvm] r185766 - COFFDumper: Print uint64_t with the right format string.

Kai Nacke kai.nacke at redstar.de
Sat Jul 6 13:16:55 PDT 2013


Hi Benjamin!

Really good catch. I suspect that this is the reason why the tests of my 
commit r185760 fail on linux-mips. Thanks for fixing it.

Regards
Kai

On 06.07.2013 22:01, Benjamin Kramer wrote:
> Author: d0k
> Date: Sat Jul  6 15:01:46 2013
> New Revision: 185766
>
> URL: http://llvm.org/viewvc/llvm-project?rev=185766&view=rev
> Log:
> COFFDumper: Print uint64_t with the right format string.
>
> I wish we could typecheck llvm::format.
>
> Modified:
>      llvm/trunk/tools/llvm-readobj/COFFDumper.cpp
>
> Modified: llvm/trunk/tools/llvm-readobj/COFFDumper.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/COFFDumper.cpp?rev=185766&r1=185765&r2=185766&view=diff
> ==============================================================================
> --- llvm/trunk/tools/llvm-readobj/COFFDumper.cpp (original)
> +++ llvm/trunk/tools/llvm-readobj/COFFDumper.cpp Sat Jul  6 15:01:46 2013
> @@ -479,15 +479,15 @@ static std::string formatSymbol(const st
>
>     StringRef Sym;
>     if (resolveSymbolName(Rels, Offset, Sym)) {
> -    Str << format(" (0x%X)", Offset);
> +    Str << format(" (0x%" PRIX64 ")", Offset);
>       return Str.str();
>     }
>
>     Str << Sym;
>     if (Disp > 0) {
> -    Str << format(" +0x%X (0x%X)", Disp, Offset);
> +    Str << format(" +0x%X (0x%" PRIX64 ")", Disp, Offset);
>     } else {
> -    Str << format(" (0x%X)", Offset);
> +    Str << format(" (0x%" PRIX64 ")", Offset);
>     }
>
>     return Str.str();
>
>
> _______________________________________________
> 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