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

Duncan P. N. Exon Smith dexonsmith at apple.com
Sun Nov 9 19:59:56 PST 2014


> 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