search for: llvm_load_ir_library

Displaying 4 results from an estimated 4 matches for "llvm_load_ir_library".

2017 Mar 08
2
LLVMGetBitcodeModuleInContext2 problem
I'm trying to use LLVMGetBitcodeModuleInContext2 to load a .bc file. However, it's not working. The code looks something like this: void llvm_load_IR_library(char *path) { LLVMContextRef global_context; LLVMMemoryBufferRef module_path; LLVMModuleRef ir_lib_module; bool flag; module_path = LLVMCreateMemoryBufferWithMemoryRange(path, strlen(path), "path", 1); global_context = LLVMGetGlobalContex...
2017 Mar 09
2
LLVMGetBitcodeModuleInContext2 problem
...get(); LLVMInitializeNativeAsmPrinter(); LLVMInitializeNativeAsmParser(); Now it crashes in LLVMGetFunctionAddress(). Hmm. On Wed, Mar 8, 2017 at 5:14 PM, Toshiyasu Morita <toshi at tensyr.com> wrote: > Made it a bit further. Here's the current code: > > void llvm_load_IR_library(char *path) > { > char *error; > LLVMExecutionEngineRef engine; > object0_t* (*func)(void), *output; > LLVMContextRef global_context; > LLVMMemoryBufferRef module; > LLVMModuleRef ir_lib_module; > bool flag; > >...
2017 Mar 08
2
LLVMGetBitcodeModuleInContext2 problem
Or do you mean I need to load the module into memory before calling LLVMGetBitcodeModuleInContext2? > Yes, you need to load the module into memory first. > LLVMCreateMemoryBufferWithContentsOfFile will do that for you. Thanks! On Wed, Mar 8, 2017 at 3:48 PM, Friedman, Eli <efriedma at codeaurora.org> wrote: > On 3/8/2017 3:44 PM, Toshiyasu Morita wrote: > > >>
2017 Mar 08
2
LLVMGetBitcodeModuleInContext2 problem
...eaurora.org> wrote: > On 3/8/2017 3:29 PM, Toshiyasu Morita via llvm-dev wrote: > >> >> I'm trying to use LLVMGetBitcodeModuleInContext2 to load a .bc file. >> However, it's not working. >> >> The code looks something like this: >> >> void llvm_load_IR_library(char *path) >> >> { >> LLVMContextRef global_context; >> LLVMMemoryBufferRef module_path; >> LLVMModuleRef ir_lib_module; >> bool flag; >> >> module_path = LLVMCreateMemoryBufferWithMemoryRange(path, >> st...