[LLVMdev] Why asserts don't provide much information?
devang.patel at gmail.com
Fri Jun 4 10:45:04 PDT 2010
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
> 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.
More information about the llvm-dev