[LLVMdev] Argument's types mismatch when creating CallInst.

Dmitry N. Mikushin maemarcus at gmail.com
Sat Nov 12 08:57:27 PST 2011


Hi,

I saw the same error in case of passing arguments of wrong types to
CallInst. So, the problem is likely not in Function::Create, it should
be OK, but in CallInst. Could you experiment with adding/removing
arguments in function prototype to determine which one is causing an
error?

Hope it helps,
- Dima.

2011/11/12 arrowdodger <6yearold at gmail.com>:
> On Fri, Nov 11, 2011 at 11:00 PM, Eli Friedman <eli.friedman at gmail.com>
> wrote:
>>
>> A CallInst in one module can't reference a Function in another module.
>>  Build a declaration of foo in the module where you're building the
>> call, and call that.
>>
>> -Eli
>
> Hmm, before emitting any code i've added this:
>
> Function::Create(fooFunction->getFunctionType(),fooFunction->getLinkage(),"foo",myModule);
>
> Now i see @foo declaration when dumping myModule, but the error is still
> same.
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>




More information about the llvm-dev mailing list