Displaying 6 results from an estimated 6 matches for "waxiadao".
2014 Apr 04
2
[LLVMdev] Weird problems on calling an external function from MCJIT on Windows(mingw)
...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 advice,but I have to tell that it made no
> > difference too calling
> >
> "LLVMAddGlobalMapping(ee,LLVMGetNamedFunction(m,"_a_outside_func"),(void*)(&a_outs...
2014 Apr 04
2
[LLVMdev] Weird problems on calling an external function from MCJIT on Windows(mingw)
...m the binary.
>
> Most probably, the best way here is to create an explicit mapping
> between a GlobalValue which represents your external function and the
> address of your function. ExecutionEngine::addGlobalMapping() is your
> friend here.
>
> On Fri, Apr 4, 2014 at 9:48 AM, waxiadao at gmail.com <waxiadao at gmail.com>
> wrote:
> > Hi,
> > I have a IR file generated by Clang:
> >
> > ; ModuleID = 'test_load_lib.c'
> > target datalayout =
> >
> "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64...
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
2014 Apr 04
2
[LLVMdev] Weird problems on calling an external function from MCJIT on Windows(mingw)
Hi,
I have a IR file generated by Clang:
; ModuleID = 'test_load_lib.c'
target datalayout =
"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f80:128:128-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S32"
target triple = "i686-pc-mingw32"
declare i32 @a_outside_func(i32)
define i32 @test_func() {
entry:
%call = call i32
2014 Aug 01
3
[LLVMdev] LLVM Basic Program Compilation
I am just getting started with llvm.
Here's code I am trying to compile:
#include <stdio.h>#include "llvm/IR/LLVMContext.h"#include
"llvm/IR/Module.h"#include "llvm/IR/IRBuilder.h"
int main(){
llvm::LLVMContext& context = llvm::getGlobalContext();
llvm::Module* module = new llvm::Module("top", context);
llvm::IRBuilder<>
2014 Apr 09
2
[LLVMdev] Changing the value returned by sizeof
Hello,
I'm replacing a struct with another struct of a different size. A problem
arises when the following line occurs in the source code:
MyStruct *a = malloc(sizeof(a));
The 'sizeof(a)' is turned into a constant in the LLVM IR, resulting in the
wrong amount of memory being allocated for the struct. Is there any way to
find all the constants that have arisen from sizeof?
Thanks,