[LLVMdev] Opaque types in function parameters
Carlos Sánchez de La Lama
carlos.delalama at urjc.es
Tue Sep 15 10:59:28 PDT 2009
Hi all,
I am creating a function and trying to call it using the LLVM API. It
seems that whenever the function type includes an opaque-typed
parameter, the CallInst::Create call causes an assert:
Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i)
== Params[i]->getType()) && "Calling a function with a bad
signature!"), function init, file /usr/home/csanchez/shared/prj/tce/
src/llvm-2.5/lib/VMCore/Instructions.cpp, line 294.
If I change the code so the function type has only non-opaque types,
everything is correct. Of course, the parameters passed to the
function are correct (I call with either an opaque parameter or an
integer parameter, to match function type). According to the assert,
I would say an opaque type always compares to false (even with
another opaque), but this does not make much sense I do not see such
in the source. I am using llvm-2.5
Does anybody find an explanation for this?
Thanks a lot,
Carlos
More information about the llvm-dev
mailing list