This is an archive of the discontinued LLVM Phabricator instance.

COFF: Change the /lldmap output format to be more like the ELF linker.
ClosedPublic

Authored by pcc on Jan 13 2017, 6:22 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

pcc updated this revision to Diff 84413.Jan 13 2017, 6:22 PM
pcc retitled this revision from to COFF: Change the /lldmap output format to be more like the ELF linker..
pcc updated this object.
pcc added a reviewer: ruiu.
pcc added a subscriber: llvm-commits.
ruiu added inline comments.Jan 13 2017, 6:44 PM
lld/COFF/Chunks.h
190 ↗(On Diff #84413)

Maybe we should just make File public?

lld/COFF/MapFile.cpp
37 ↗(On Diff #84413)

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.

67 ↗(On Diff #84413)

If you hard-code Width 8, please remove that variable and inline.

pcc marked 2 inline comments as done.Jan 13 2017, 7:00 PM
pcc added inline comments.
lld/COFF/MapFile.cpp
37 ↗(On Diff #84413)

Right, the only real common part here is these 30 or so lines, and it didn't seem worth splitting that out into a library.

pcc updated this revision to Diff 84420.Jan 13 2017, 7:00 PM
  • Address review comments
ruiu accepted this revision.Jan 13 2017, 7:06 PM
ruiu edited edge metadata.

LGTM

lld/test/COFF/lldmap.test
10 ↗(On Diff #84420)

You want to remove / so that this test isn't picky about path separator difference.

This revision is now accepted and ready to land.Jan 13 2017, 7:06 PM
This revision was automatically updated to reflect the committed changes.