[PATCH] Add a unit test for MemoryBuffer::getOpenFile

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Jul 23 03:22:47 PDT 2013


Unless you want to test unbuffered files too, it might be better to do
something like

{
 raw_fd_ostream OF(TestFD, true, true);
....
}

OwningBuffer Buf;


You probably want to pass the buff size, not the filesize down to
MemoryBuffer::getOpenFile.

On 22 July 2013 17:40, Aaron Ballman <aaron at aaronballman.com> wrote:
> I would agree; CCing Rafael since he's done a lot of work in this area.
>
> Thanks for the tests!
>
> ~Aaron
>
> On Mon, Jul 22, 2013 at 5:37 PM, Eli Bendersky <eliben at google.com> wrote:
>>
>>
>>
>> On Mon, Jul 22, 2013 at 2:23 PM, Aaron Ballman <aaron at aaronballman.com>
>> wrote:
>>>
>>> LGTM!  Does this demonstrate a failure with the recent changes?
>>
>>
>> This unit tests is part of trying to figure that out :-)
>> I'm debugging a strange failure in this code that occurs in the 3.3 release
>> branch on 32-bit Windows w/ Cygwin. Some of this code was changed quite a
>> bit after 3.3 so I expect to submit more unit tests. AFAIU if any of the
>> LLVM Windows bots fails on this unittest it will indicate a problem in the
>> implementation.
>>
>> Eli
>>
>>
>>
>>
>>



More information about the llvm-commits mailing list