[llvm] r310253 - [DebugInfo][DWARF] Use PRIx64 explicitly in output.
Robinson, Paul via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 7 08:44:58 PDT 2017
> -----Original Message-----
> From: llvm-commits [mailto:llvm-commits-bounces at lists.llvm.org] On Behalf
> Of Simon Dardis via llvm-commits
> Sent: Monday, August 07, 2017 9:30 AM
> To: llvm-commits at lists.llvm.org
> Subject: [llvm] r310253 - [DebugInfo][DWARF] Use PRIx64 explicitly in
> output.
>
> Author: sdardis
> Date: Mon Aug 7 06:30:03 2017
> New Revision: 310253
>
> URL: http://llvm.org/viewvc/llvm-project?rev=310253&view=rev
> Log:
> [DebugInfo][DWARF] Use PRIx64 explicitly in output.
>
> Modified:
> llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp
>
> Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp?rev=310253&r1=3102
> 52&r2=310253&view=diff
> ==========================================================================
> ====
> --- llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp (original)
> +++ llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp Mon Aug 7 06:30:03
> 2017
> @@ -136,13 +136,13 @@ dumpDWARFv5StringOffsetsSection(raw_ostr
> uint64_t StringOffset =
> StrOffsetExt.getRelocatedValue(EntrySize, &Offset);
> if (Format == DWARF32) {
> - OS << format("%8.8x ", StringOffset);
> + OS << format("%8.8" PRIx64 " ", StringOffset);
The offsets are 32-bit in DWARF32 format, so I think doing the
conversion to uint32_t first and printing that would be better.
--paulr
> uint32_t StringOffset32 = (uint32_t)StringOffset;
> const char *S = StrData.getCStr(&StringOffset32);
> if (S)
> OS << format("\"%s\"", S);
> } else
> - OS << format("%16.16x ", StringOffset);
> + OS << format("%16.16" PRIx64 " ", StringOffset);
> OS << "\n";
> }
> }
>
>
> _______________________________________________
> 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