[LLVMdev] Why asserts don't provide much information?
llvm at assumetheposition.nl
Sat Jun 5 00:27:39 PDT 2010
On 06/04/10 05:12, Curtis Faith wrote:
> I concur. I've run into this exact assert at least 10 different times in the last two weeks since I started with LLVM as I'm learning the particulars of the typing system for function calls in particular.
> It would be nice if it would tell you what expected signature was, what the value of i was so you know which parameter went wrong, and what the actual type passed in was, as well as what was expected. You can get this information yourself but it is a real pain.
Jeffrey Yasskin had a tip some time ago about this particular assertion:
"In general, when I hit one of those assertions, I gdb to it, use "p
f->dump()" to see the types of the function's arguments, and use "p
Params[i]->dump()" to see the parameter with the bad type."
More information about the llvm-dev