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

Chandler Carruth chandlerc at google.com
Tue Jun 19 17:41:16 PDT 2012


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...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120619/508ec224/attachment.html>


More information about the llvm-commits mailing list