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

Yuri yuri at rawbw.com
Thu Jun 3 16:36:09 PDT 2010

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.


More information about the llvm-dev mailing list