[llvm] r347049 - [DWARF] Use PRIx64 instead of 'x' to format 64-bit values

Simon Atanasyan via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 16 05:14:26 PST 2018


Author: atanasyan
Date: Fri Nov 16 05:14:26 2018
New Revision: 347049

URL: http://llvm.org/viewvc/llvm-project?rev=347049&view=rev
Log:
[DWARF] Use PRIx64 instead of 'x' to format 64-bit values

This is a follow-up to r346715. Use PRIx64 to formatted print of 64-bit
value in the `DWARFDebugLoclists::LocationList::dump` to escape problem
on big-endian hosts.

Modified:
    llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp

Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp?rev=347049&r1=347048&r2=347049&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp Fri Nov 16 05:14:26 2018
@@ -235,14 +235,14 @@ void DWARFDebugLoclists::LocationList::d
     case dwarf::DW_LLE_start_length:
       OS << '\n';
       OS.indent(Indent);
-      OS << format("[0x%*.*" PRIx64 ", 0x%*.*x): ", AddressSize * 2,
+      OS << format("[0x%*.*" PRIx64 ", 0x%*.*" PRIx64 "): ", AddressSize * 2,
                    AddressSize * 2, E.Value0, AddressSize * 2, AddressSize * 2,
                    E.Value0 + E.Value1);
       break;
     case dwarf::DW_LLE_offset_pair:
       OS << '\n';
       OS.indent(Indent);
-      OS << format("[0x%*.*" PRIx64 ", 0x%*.*x): ", AddressSize * 2,
+      OS << format("[0x%*.*" PRIx64 ", 0x%*.*" PRIx64 "): ", AddressSize * 2,
                    AddressSize * 2, BaseAddr + E.Value0, AddressSize * 2,
                    AddressSize * 2, BaseAddr + E.Value1);
       break;




More information about the llvm-commits mailing list