This is an archive of the discontinued LLVM Phabricator instance.

[llvm-objdump][ELF][NFC] Create ELFDump.h
ClosedPublic

Authored by hubert.reinterpretcast on Apr 22 2020, 9:55 PM.

Details

Summary

Continuing from D77285, the external interfaces implemented by
ELFDump.cpp are now declared in ELFDump.h and moved into the
llvm::objdump namespace. Externs defined in ELFDump.cpp that are
unreferenced externally are also made static.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2020, 9:56 PM
Herald added a subscriber: rupprecht. · View Herald Transcript
MaskRay accepted this revision.Apr 22 2020, 10:33 PM

Looks great! Thanks for cleaning up the interface.

This revision is now accepted and ready to land.Apr 22 2020, 10:33 PM
jhenderson accepted this revision.Apr 23 2020, 12:21 AM

LGTM too, thanks!

RKSimon added inline comments.
llvm/tools/llvm-objdump/ELFDump.h
13

you can avoid the smallvector include as well:
template <typename T> class SmallVectorImpl;

MaskRay added inline comments.Apr 23 2020, 10:24 AM
llvm/tools/llvm-objdump/ELFDump.h
13

I think leaving this include here is fine. SmallVector.h is just so ubiquitous.

hubert.reinterpretcast marked 3 inline comments as done.Apr 23 2020, 6:20 PM
hubert.reinterpretcast added inline comments.
llvm/tools/llvm-objdump/ELFDump.h
13

I'm inclined to agree with @MaskRay, we'd need a header inclusion for uint64_t if we were not to include SmallVector.h.

This revision was automatically updated to reflect the committed changes.