[PATCH] run the unit test for MemoryBuffer::getOpenFile in two different modes

Rafael Espíndola rafael.espindola at gmail.com
Tue Jul 23 13:27:28 PDT 2013


Cool. I clang-formatted it and committed as r186984.

On 23 July 2013 15:58, Eli Bendersky <eliben at google.com> wrote:
>
>
>
> 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
>> >
>> >
>
>




More information about the llvm-commits mailing list