[LLVMdev] Why asserts don't provide much information?

Devang Patel devang.patel at gmail.com
Fri Jun 4 10:45:04 PDT 2010


Hi Yuri,

On Thu, Jun 3, 2010 at 4:36 PM, Yuri <yuri at rawbw.com> wrote:
> When for example some call is wrong error message always looks like this:
> Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) ==
> Params[i]->getType()) && "Calling a function with a bad signature!"),
> function init, file /tmp/llvm-svn/llvm/lib/VMCore/Instructions.cpp, line
> 247.
>
> I believe assert() statements should better be replaced with more
> detailed printouts of what is wrong. This will save many people a lot of
> debugging time.
>

It it the way it is because whoever wrote the assertion felt that it
conveyed enough information. However, feel free to send patches to
update Assert message where you think the message could be improved.

-
Devang



More information about the llvm-dev mailing list