This is an archive of the discontinued LLVM Phabricator instance.

[llvm-objdump] - Introduce getRelocsMap() helper. NFCI.
ClosedPublic

Authored by grimar on Jan 21 2019, 7:26 AM.

Details

Summary

Currently disassembleObject() is a ~550 lines length function.
This patch extracts the code that creates a section->its relocation
mapping into a new helper function to simplify/reduce it a bit.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar created this revision.Jan 21 2019, 7:26 AM
jhenderson accepted this revision.Jan 22 2019, 4:28 AM

LGTM. I would sound a note of caution that disassembly performance is important, but it looks like this has the potential to improve it!

tools/llvm-objdump/llvm-objdump.cpp
871 ↗(On Diff #182791)

to its -> to their

This revision is now accepted and ready to land.Jan 22 2019, 4:28 AM
This revision was automatically updated to reflect the committed changes.
grimar marked an inline comment as done.