Page MenuHomePhabricator

[ELF] Add getOffset to ELFSectionRef and enable LLVM casting for it

Authored by evgeny777 on Oct 28 2016, 7:58 AM.

Diff Detail


Event Timeline

evgeny777 updated this revision to Diff 76191.Oct 28 2016, 7:58 AM
evgeny777 retitled this revision from to [ELF] Add getOffset to ELFSectionRef and enable LLVM casting for it.
evgeny777 updated this object.
evgeny777 added reviewers: rafael, hans, grimar.
evgeny777 set the repository for this revision to rL LLVM.
evgeny777 added a project: lld.
evgeny777 added subscribers: ikudrin, llvm-commits.
ruiu added inline comments.Oct 28 2016, 11:28 AM
99–101 ↗(On Diff #76191)

Why do you want this?

I have Sectio

99–101 ↗(On Diff #76191)

I have SectionRef object and I want to get section offset, which is ELF section property.
With this I can write:


Without it I have to use this one:

rafael edited edge metadata.Oct 28 2016, 1:09 PM

The part adding getSectionOffset LGTM, but I agree with Rui that it is odd to have classof in only part of the hierarchy.

rafael accepted this revision.Oct 28 2016, 1:09 PM
rafael edited edge metadata.
This revision is now accepted and ready to land.Oct 28 2016, 1:09 PM
This revision was automatically updated to reflect the committed changes.