Displaying 3 results from an estimated 3 matches for "fn_type".
Did you mean:
f_type
2011 Jan 18
2
[LLVMdev] compiling a call to function in compiler
...ter. But I'm
getting...
Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of
incompatible type!"),
function cast, file /usr/local/include/llvm/Support/Casting.h, line 202.
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 mo...
2011 Jan 18
0
[LLVMdev] compiling a call to function in compiler
...ertion failed: (isa<X>(Val) && "cast<Ty>() argument of
> incompatible type!"),
> function cast, file /usr/local/include/llvm/Support/Casting.h, line 202.
>
> 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...
2011 Jan 18
1
[LLVMdev] compiling a call to function in compiler
On Mon, Jan 17, 2011 at 8:36 PM, Eric Christopher <echristo at apple.com> wrote:
>
> 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 do...