Displaying 3 results from an estimated 3 matches for "arg1val".
Did you mean:
arg1_val
2011 Jan 18
2
[LLVMdev] compiling a call to function in compiler
...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
...estfunc(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.
-eric
---...
2011 Jan 18
1
[LLVMdev] compiling a call to function in compiler
...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 shou...