This is an archive of the discontinued LLVM Phabricator instance.

[llvm/Object] - Remove ELFFile<ELFT>::getSection(const StringRef SectionName). NFC.
ClosedPublic

Authored by grimar on Jul 29 2019, 3:42 AM.

Details

Summary

This method is dead. It was introduced in D47989,
but now the logic from D63475 is used in llvm-readobj instead.
Also it has a problem: it returns the first matching section,
even if there are multiple sections with the same name.

Diff Detail

Event Timeline

grimar created this revision.Jul 29 2019, 3:42 AM
MaskRay accepted this revision.Aug 3 2019, 6:40 PM

The declaration :274 Expected<const Elf_Shdr *> getSection(const StringRef SectionName) const; should be deleted as well.

This revision is now accepted and ready to land.Aug 3 2019, 6:40 PM
grimar added a comment.Aug 5 2019, 4:13 AM

The declaration :274 Expected<const Elf_Shdr *> getSection(const StringRef SectionName) const; should be deleted as well.

Thanks! I did not notice it. Going to commit soon.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 5 2019, 4:18 AM