[DWARF] Use PRIx64 instead of 'x' to format 64-bit values
authorSimon Atanasyan <simon@atanasyan.com>
Fri, 16 Nov 2018 13:14:26 +0000 (13:14 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Fri, 16 Nov 2018 13:14:26 +0000 (13:14 +0000)
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.

llvm-svn: 347049

llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp

index 9146b45..6bf711c 100644 (file)
@@ -235,14 +235,14 @@ void DWARFDebugLoclists::LocationList::dump(raw_ostream &OS, uint64_t BaseAddr,
     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;