[PATCH] Add a helpful assert if LineNo would clobber ArgNo

Keno Fischer kfischer at college.harvard.edu
Sun Nov 9 20:05:29 PST 2014


I like the assertion because in my case it told me I was passing an
invalid line number. I'm fine with either behavior though.

On Sun, Nov 9, 2014 at 10:59 PM, Duncan P. N. Exon Smith
<dexonsmith at apple.com> wrote:
>
>> On 2014 Nov 9, at 13:34, Keno Fischer <kfischer at college.harvard.edu> wrote:
>>
>> Hi echristo,
>>
>> Otherwise passing in an invalid line number on accident (e.g. -1)
>> would cause a hard-to-decipher assert later on. Better to catch this early.
>>
>> http://reviews.llvm.org/D6186
>>
>> Files:
>>  lib/IR/DIBuilder.cpp
>
> I think this should degrade (maybe to ~0u>>8?) rather than asserting.
>
> Thoughts?



More information about the llvm-commits mailing list