Displaying 3 results from an estimated 3 matches for "arg0val".
2011 Jan 18
2
[LLVMdev] compiling a call to function in compiler
...2.
Code snippets...
id testfunc(id a, id b) { ... }
...
FunctionType *fn_type = FunctionType::get(id_type, argtypes, false);
Value *fn = ConstantExpr::getIntToPtr(ConstantInt::get(int64_type,
reinterpret_cast<int64_t>(testfunc)), fn_type);
return builder.CreateCall2(fn, arg0val, arg1val); // <--
assertion fails here
What am I doing wrong? I can paste more code if needed.
thanks,
Rob
2011 Jan 18
0
[LLVMdev] compiling a call to function in compiler
...; id testfunc(id a, id b) { ... }
> ...
> FunctionType *fn_type = FunctionType::get(id_type, argtypes, false);
> Value *fn = ConstantExpr::getIntToPtr(ConstantInt::get(int64_type,
> reinterpret_cast<int64_t>(testfunc)), fn_type);
> return builder.CreateCall2(fn, arg0val, arg1val); // <--
> assertion fails here
>
> What am I doing wrong? I can paste more code if needed.
One of the types doesn't match the types of what you are trying to pass.
You should debug which one it is and why the types aren't matching what
you think they should be....
2011 Jan 18
1
[LLVMdev] compiling a call to function in compiler
...t; id testfunc(id a, id b) { ... }
> ...
> FunctionType *fn_type = FunctionType::get(id_type, argtypes, false);
> Value *fn = ConstantExpr::getIntToPtr(ConstantInt::get(int64_type,
> reinterpret_cast<int64_t>(testfunc)), fn_type);
> return builder.CreateCall2(fn, arg0val, arg1val); // <--
> assertion fails here
>
> What am I doing wrong? I can paste more code if needed.
>
> One of the types doesn't match the types of what you are trying to pass.
> You should debug which one it is and why the types aren't matching what
> you think...