[llvm-commits] Add GetOffset() to SectionRef in ObjectFile

Michael Spencer bigcheesegs at gmail.com
Fri Oct 14 10:57:20 PDT 2011


On Thu, Oct 13, 2011 at 5:16 PM, Danil Malyshev
<dmalyshev at accesssoftek.com> wrote:
> Hello everyone,
>
>
>
> Please find attached the patch for review.
>
> The patch adds the GetOffset() method to the SectionRef in ObjectFile.
>
> The GetOffset() returns offset of section from begin of object file.
>
>
>
>
>
> Regards,
>
> Danil

This is unneeded because the same result can be obtained with
(Simplified code a bit).

section->getSectionContents().begin() - object->getData().begin()

I'm fine with adding this to SectionRef instead of adding a new
function to each implementation.

- Michael Spencer



More information about the llvm-commits mailing list