[PATCH] run the unit test for MemoryBuffer::getOpenFile in two different modes
Eli Bendersky
eliben at google.com
Tue Jul 23 12:58:41 PDT 2013
On Tue, Jul 23, 2013 at 12:50 PM, Rafael EspĂndola <
rafael.espindola at gmail.com> wrote:
> What do you think of the attached patch? Splitting the interface so
> that there is always only one size is probably better than asserting
> that the correct size is passed.
>
LGTM! I like the idea of splitting the API.
+ static error_code getOpenFileSlice(int FD, const char *Filename,
+ OwningPtr<MemoryBuffer> &Result,
+ uint64_t MapSize,
+ int64_t Offset);
+
Style nit: Is the formatting OK here? Aligning all arguments to the same
column is probably nicer. Same applies to other places in the patch.
Eli
>
> On 23 July 2013 14:03, Eli Bendersky <eliben at google.com> wrote:
> >
> >
> >
> > On Tue, Jul 23, 2013 at 10:57 AM, Rafael EspĂndola
> > <rafael.espindola at gmail.com> wrote:
> >>
> >> > Sure. But one question remains - is gold-plugin using the API of
> >> > getOpenFile
> >> > incorrectly by passing a positive Offset, and at the same time passing
> >> > the
> >> > buffer size into FileSize rather than MapSize?
> >>
> >> I am almost sure it is. I will try to change it too. Thanks for finding
> >> this!
> >>
> >
> > Cool. I'll wait until after your change(s) to push the updated test.
> >
> > Eli
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130723/5d4a2758/attachment.html>
More information about the llvm-commits
mailing list