[lld] r292102 - [ELF] - Fix format specifiers in writeOutSecLine()
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 16 10:48:28 PST 2017
Thanks!
George Rimar via llvm-commits <llvm-commits at lists.llvm.org> writes:
> Author: grimar
> Date: Mon Jan 16 05:35:38 2017
> New Revision: 292102
>
> URL: http://llvm.org/viewvc/llvm-project?rev=292102&view=rev
> Log:
> [ELF] - Fix format specifiers in writeOutSecLine()
>
> I had a error in map-file.s testcase under MSVS2015/win32:
>
> map-file.s:30:16: error: expected string not found in input
> // CHECK-NEXT: 0000000000200158 0000000000000030 8 .eh_frame
>
> <stdin>:2:1: note: scanning from here
> 0000000000200158 10 30 .eh_frame
>
> Format string '%0*x' requires an argument of type 'unsigned int',
> but argument has type 'uint64_t'. Proper format is '%0*llx' then.
>
> This fixes testcase failture for me.
>
> Modified:
> lld/trunk/ELF/MapFile.cpp
>
> Modified: lld/trunk/ELF/MapFile.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/MapFile.cpp?rev=292102&r1=292101&r2=292102&view=diff
> ==============================================================================
> --- lld/trunk/ELF/MapFile.cpp (original)
> +++ lld/trunk/ELF/MapFile.cpp Mon Jan 16 05:35:38 2017
> @@ -35,7 +35,7 @@ using namespace lld::elf;
>
> static void writeOutSecLine(raw_fd_ostream &OS, int Width, uint64_t Address,
> uint64_t Size, uint64_t Align, StringRef Name) {
> - OS << format("%0*x %0*x %5x ", Width, Address, Width, Size, Align)
> + OS << format("%0*llx %0*llx %5llx ", Width, Address, Width, Size, Align)
> << left_justify(Name, 7);
> }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list