similar to: [LLVMdev] LLVM linkage error - Program used external function 'foo' which could not be resolved!

Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] LLVM linkage error - Program used external function 'foo' which could not be resolved!"

2011 Apr 05
3
[LLVMdev] inserting a print statement into IR
Hi Everyone, I am trying to construct the print statement : printf("value:%d\n", value); This is my llvm code. It is seg faulting at builder.CreateGlobalStringPtr(str,""). Thanks. George vector<const Type *> params; params.push_back(Type::getInt8PtrTy(M.getContext())); FunctionType *fType = FunctionType::get(Type::getInt32Ty(M.getContext()), params, true); Constant
2011 Apr 01
3
[LLVMdev] insert printf into IR
Hi All, I am trying to insert printf ("%d", v), where v is an integer param, into the IR. I am doing something wrong because I keep getting segfaults. Below is my code. Thanks. vector<const Type *> params; params.push_back(Type::getInt8PtrTy(M.getContext())); params.push_back(Type::getInt32Ty(M.getContext())); FunctionType *fType =
2011 Apr 05
0
[LLVMdev] inserting a print statement into IR
On 4/4/2011 6:26 PM, George Baah wrote: > Hi Everyone, > I am trying to construct the print statement : printf("value:%d\n", > value); > This is my llvm code. It is seg faulting at > builder.CreateGlobalStringPtr(str,""). This might be easier to debug with a stack trace. Use a debugger to see the call stack when the segfault occurs. Also try to isolate
2008 Feb 13
3
[LLVMdev] LLVM2.2 x64 JIT trouble on VStudio build
Hola LLVMers, I'm debugging through some strangeness that I'm seeing on X64 on windows with LLVM2.2. I had to change the code so that it would engage the x64 target machine on windows builds, but I've otherwise left LLVM 2.2 alone. The basic idea is that I've got a function bar which is compiled by VStudio and I'm creating another function foo via LLVM JIT which is going
2014 May 28
2
[LLVMdev] how to call the function in hosting code from JITted IR code..?
Dears, I'm trying to call the function that defined in the host application from IR code, but LLVM is saying that there is no such function... I've seen the tutorial of Kaleidoscope, and defined the function as extern "C" { void test1(void) { cout << "test function in the host application \n" ; } } ...in the host application. Would you please let me give any
2011 Jan 18
2
[LLVMdev] compiling a call to function in compiler
Hi, I'm trying to follow the advice from this message: http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-October/017574.html, to create a call instruction from a function pointer. 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.
2013 Nov 11
2
[LLVMdev] Android JIT patch
On 11/11/13 17:42, Kaylor, Andrew wrote: > I've got a number of problems with this patch. > > First, we have plans to pry apart the remaining strands connecting JIT with MCJIT, so I don't want to do anything that reconnects them. That is, I'm against moving things from RTDyldMemoryManager into ExecutionEngine. The direction of LLVM is not something I'm in a position to
2013 Nov 11
4
[LLVMdev] Android JIT patch
I've attached a patch which has got JIT compilation working (for me at least!) on Android. It turns out that the problem was a bunch of intrinsic __aeabi* functions which reside in libgcc.a rather than libc.so so are not available unless explicitly linked in, so it's rather similar to the StatSymbols hack. I moved the StatSymbols code into ExecutionEngine.cpp rather than
2013 Nov 11
0
[LLVMdev] Android JIT patch
I've got a number of problems with this patch. First, we have plans to pry apart the remaining strands connecting JIT with MCJIT, so I don't want to do anything that reconnects them. That is, I'm against moving things from RTDyldMemoryManager into ExecutionEngine. Second, unless I'm reading it wrong, this relies on static constructors. That causes headaches and is against the
2010 Aug 19
2
[LLVMdev] using external functions from llvm
Is there documentation somewhere on how to call external functions from llvm? The only guide I found was this: http://www.gearleaf.com/blog/post/44, and it doesn't seem to be working for me. I have a function: llvm::GenericValue lle_X_create_number_object(llvm::FunctionType* ft, const std::vector<llvm::GenericValue>& args) { llvm_object_structure* result = new
2010 Aug 19
3
[LLVMdev] using external functions from llvm
The blog post I linked to implied that adding a symbol in the form lle_X_FUNCTIONNAME would allow you to call a function called FUNCTIONNAME. Is this not the case? On Thu, Aug 19, 2010 at 6:46 PM, <o.j.sivart at gmail.com> wrote: > You are adding the symbol as "lle_X_create_number_object" yet your error > message implies you have tried to lookup and use
2011 Jan 18
0
[LLVMdev] compiling a call to function in compiler
On Jan 17, 2011, at 5:01 PM, Rob Nikander wrote: > Hi, > > I'm trying to follow the advice from this message: > http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-October/017574.html, > to create a call instruction from a function pointer. But I'm > getting... > > Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of > incompatible
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,
2013 Nov 14
3
[LLVMdev] Android JIT patch
Well, is the attached version better? I've extended the RTDyldMemoryManager hooks instead to pick up the ARM math functions statically, and left JITMemoryManager alone except for changing the conditional so that it will build with non-glibc libraries. I've also split the original patch up into two parts, to separate the math function fixes from setLastModificationAndAccessTime. The
2013 Nov 15
3
[LLVMdev] Android JIT patch
Here's an updated version with more comments. James On 14/11/13 23:06, Kaylor, Andrew wrote: > Oh, I see now. It turns out that even knowing what the end goal was I misunderstood part of what the macros were doing. > > If you could add some comments explaining what the macros are doing then I guess I can live with the patch in this form. I definitely agree that it's better not
2008 Feb 15
0
[LLVMdev] LLVM2.2 x64 JIT trouble on VStudio build
On Feb 12, 2008, at 5:26 PM, Chuck Rose III wrote: > Hola LLVMers, > > I’m debugging through some strangeness that I’m seeing on X64 on > windows with LLVM2.2. I had to change the code so that it would > engage the x64 target machine on windows builds, but I’ve otherwise > left LLVM 2.2 alone. The basic idea is that I’ve got a function bar > which is compiled by
2013 Nov 14
2
[LLVMdev] Android JIT patch
Well, the reason I did it that way was that the list of functions is fairly long and has to be written out twice; once to declare the functions and once to do the if(Name==#fn) bit, and I thought nested macros was simpler than having two copies of the list. On 14/11/13 22:07, Kaylor, Andrew wrote: > Thanks for splitting up the patch. I'm not the right person to comment on the
2014 Mar 01
2
[LLVMdev] MCJIT crash on 64 bit Linux, works find on OSX
Hi All. I have an issue when a MCJIT ExecutionEngine is created then deleted, any C++ exception thrown after the MCJIT dtor is called will result in a seg fault. This does not occur with the regular JIT engine, and only occurs on Linux, works fine on OSX. basically its like this: ExecutionEngine *e = engineBuilder.create(); // this is fine try { throw exception()} catch(exception&) {}
2010 Aug 20
0
[LLVMdev] using external functions from llvm
> I'm afraid that you might be utterly confused about how to use LLVM. Er, I don't think so? I think I was mostly just confused about interfacing with external functions, since whoever wrote that blog post ( http://www.gearleaf.com/blog/post/44) didn't seem to know what he was talking about (or he was doing stuff that once worked but now doesn't? I don't know). If you
2013 Nov 11
0
[LLVMdev] Android JIT patch
The various ExecutionEngine pieces may be the only places within LLVM that are using the DynamicLibrary stuff, but there's no telling what various LLVM consumers may be using it for. The "stat" symbols shouldn't be exposed the way they are in the old JIT memory manager location. It's not clear to me why that didn't happen inside getPointerToNamedFunction there. Is