[llvm-commits] [llvm] r158769 - /llvm/trunk/lib/Support/StreamableMemoryObject.cpp

Kaelyn Uhrain rikka at google.com
Wed Jun 20 10:27:07 PDT 2012


On Tue, Jun 19, 2012 at 5:41 PM, Chandler Carruth <chandlerc at google.com>wrote:

> On Tue, Jun 19, 2012 at 5:36 PM, Chandler Carruth <chandlerc at google.com>wrote:
>
>> On Tue, Jun 19, 2012 at 5:16 PM, Kaelyn Uhrain <rikka at google.com> wrote:
>>
>>> Author: rikka
>>> Date: Tue Jun 19 19:16:40 2012
>>> New Revision: 158769
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=158769&view=rev
>>> Log:
>>> Don't assert when given an empty range.
>>>
>>> llvm::RawMemoryObject handles empty ranges just fine, and the assert can
>>> be triggered in the wild by e.g. invoking clang with a file that
>>> included an empty pre-compiled header file when clang has been built
>>> with assertions enabled. Without assertions enabled, clang will properly
>>> report that the empty file is not a valid PCH.
>>>
>>
>> Add a test case that builds an empty pre-compiled header and invokes
>> clang with it?
>>
>
> Never mind, I see your commit now.
>
> Also, I wonder, are there any unittests for this? If so, we should add a
> unittest that covers this case. Not worth adding a completely new unittest
> though...
>

I would have added a unit test in llvm for it, but I don't know what in
llvm uses this code. Hence just the clang unit test...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120620/74ba26ab/attachment.html>


More information about the llvm-commits mailing list