[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.
llvm-svn: 292102
diff --git a/lld/ELF/MapFile.cpp b/lld/ELF/MapFile.cpp
index 8986b9f..60eee7c 100644
--- a/lld/ELF/MapFile.cpp
+++ b/lld/ELF/MapFile.cpp
@@ -35,7 +35,7 @@
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);
}