[PATCH] D28717: COFF: Change the /lldmap output format to be more like the ELF linker.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 13 18:44:06 PST 2017


ruiu added inline comments.


================
Comment at: lld/COFF/Chunks.h:190
 
+  ObjectFile *getFile() const { return File; }
+
----------------
Maybe we should just make `File` public?


================
Comment at: lld/COFF/MapFile.cpp:37
+
+static void writeOutSecLine(raw_fd_ostream &OS, int Width, uint64_t Address,
+                            uint64_t Size, uint64_t Align, StringRef Name) {
----------------
It is unfortunate that you had to copy that much code, but honestly I have no good idea to avoid that because the code here is slightly different at a lot of places.


================
Comment at: lld/COFF/MapFile.cpp:67
+                              StringRef &PrevName) {
+  int Width = 8;
+  StringRef Name = SC->getSectionName();
----------------
If you hard-code `Width` 8, please remove that variable and inline.


https://reviews.llvm.org/D28717





More information about the llvm-commits mailing list