Displaying 10 results from an estimated 10 matches for "llvmgetnamedfunction".
2014 Apr 04
2
[LLVMdev] Weird problems on calling an external function from MCJIT on Windows(mingw)
oh,I'm sorry to make such a stupid mistake...But I still have to tell the
correct one still didnt make difference...so weird
2014-04-04 16:30 GMT+08:00 Anton Korobeynikov <anton at korobeynikov.info>:
> Are you sure, that LLVMGetNamedFunction(m,"_a_outside_func") does not
> return NULL? I believe it should be
> LLVMGetNamedFunction(m,"a_outside_func")
>
> On Fri, Apr 4, 2014 at 12:25 PM, waxiadao at gmail.com <waxiadao at gmail.com>
> wrote:
> > Hello
> > I quite thank you for your ad...
2014 Apr 04
2
[LLVMdev] Weird problems on calling an external function from MCJIT on Windows(mingw)
Hello
I quite thank you for your advice,but I have to tell that it made no
difference too calling
"LLVMAddGlobalMapping(ee,LLVMGetNamedFunction(m,"_a_outside_func"),(void*)(&a_outside_func));".
2014-04-04 16:10 GMT+08:00 Anton Korobeynikov <anton at korobeynikov.info>:
> Hello
>
> While there is a symbol in the object file, there is nothing like this
> in the final executable (well, you can try to ex...
2014 Apr 04
2
[LLVMdev] Weird problems on calling an external function from MCJIT on Windows(mingw)
...VMGetGlobalContext(),ll_f,&m,&err); // ll_f doesnt
need freeing
prt(err);
LLVMDumpModule(m);
LLVMLinkInMCJIT();
LLVMExecutionEngineRef ee = 0;
LLVMCreateMCJITCompilerForModule(&ee,m,0,0,&err);
prt(err);
using tf_t = int ();
tf_t *f =
(tf_t*)LLVMGetPointerToGlobal(ee,LLVMGetNamedFunction(m,"test_func"));
At first i got "LLVM ERROR: Incompatible object format! "
But by reading some articles I append LLVMSetTarget(m,"i686-pc-mingw32");
and it's fixed.
Then I got "LLVM ERROR: Program used external function 'a_outside_func'
which could no...
2009 Oct 08
0
[LLVMdev] Some additions to the C bindings
...ng
generated code to look up those functions by name; basically searching
for all global strings containing the function name, and replacing all
uses of them with uses of the new function name.
I would like to do away with that, though, but I haven't quite managed
to get rid of all cases where LLVMGetNamedFunction is called by
generated code.
Also, I've gotten the impression from other developers that the
C-bindings are considered incomplete and that there is a general
desire to expose more functionality, and eventually all LLVM
functionality, through them.
>
>
> +/* Operations on Users */
>...
2009 Oct 09
1
[LLVMdev] Some additions to the C bindings
...k up those functions by name; basically searching
> for all global strings containing the function name, and replacing all
> uses of them with uses of the new function name.
>
> I would like to do away with that, though, but I haven't quite managed
> to get rid of all cases where LLVMGetNamedFunction is called by
> generated code.
>
> Also, I've gotten the impression from other developers that the
> C-bindings are considered incomplete and that there is a general
> desire to expose more functionality, and eventually all LLVM
> functionality, through them.
While it's...
2009 Oct 08
2
[LLVMdev] Some additions to the C bindings
On Tue, Oct 6, 2009 at 5:47 PM, Kenneth Uildriks <kennethuil at gmail.com> wrote:
> On Tue, Oct 6, 2009 at 2:13 PM, Kenneth Uildriks <kennethuil at gmail.com> wrote:
>
> LLVMGetAttribute had a bug in it. Here's the revised version of the patch
Hi Kenneth!
I wouldn't say that I'm the best reviewer, but I've been doing some
work with the c bindings recently so
2013 May 05
0
[LLVMdev] llvm-c: Types of functions
...LLVMMemoryBufferRef fileMemBuff;
LLVMCreateMemoryBufferWithContentsOfFile(
"test.bin", &fileMemBuff, &msg);
LLVMModuleRef module;
LLVMGetBitcodeModuleInContext(
context, fileMemBuff, &module, &msg);
LLVMValueRef testFunc = LLVMGetNamedFunction(module, "test");
assert(testFunc);
if (LLVMIsAFunction(testFunc)) printf("Is a Function\n"); // <-- I do see this message, so far so good
else printf("Not a Func\n");
LLVMTypeRef testType;
testType = LLVMTypeOf(testFunc);
printf("Type...
2010 Sep 07
0
[LLVMdev] Intrinsic prototype has incorrect number of arguments!
On Sep 7, 2010, at 8:03 AM, F van der Meeren wrote:
> Hello,
>
> I have a question, what is wrong with the following code?
>
> declare void @llvm.memcpy.p0i64.p0i64.i8(i64*, i64*, i8, i32, i1) nounwind
>
> ...
>
> call void @llvm.memcpy.p0i64.p0i64.i8(i64* %19, i64* %21, i8 %17, i32 0, i1 false)
>
> ...
>
>
> According to the compiler this is the
2010 Sep 07
2
[LLVMdev] Intrinsic prototype has incorrect number of arguments!
...= "llvm.memcpy.p0i%llu.p0i%llu.i%llu";
char methodName[methodNameSize];
// Create the methodName.
memset(methodName, 0, methodNameSize);
sprintf(methodName, methodNameTemplate,
dstSize,
srcSize,
lengthSize);
// Search for the function or create it.
if((function = LLVMGetNamedFunction(module, methodName)) == NULL) {
LLVMTypeRef paramTypes [] = {
dstType,
srcType,
lengthType,
LLVMInt32TypeInContext(context),
LLVMInt1TypeInContext(context),
};
functionType = LLVMFunctionType(LLVMVoidTypeInContext(context),...
2010 Sep 07
4
[LLVMdev] Intrinsic prototype has incorrect number of arguments!
Hello,
I have a question, what is wrong with the following code?
declare void @llvm.memcpy.p0i64.p0i64.i8(i64*, i64*, i8, i32, i1) nounwind
...
call void @llvm.memcpy.p0i64.p0i64.i8(i64* %19, i64* %21, i8 %17, i32 0, i1 false)
...
According to the compiler this is the error, but I seem to miss where exactly my fault is.
Intrinsic prototype has incorrect number of arguments!
void (i64*,