Displaying 4 results from an estimated 4 matches for "llvmgetbitcodemoduleincontext2".
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 09
2
LLVMGetBitcodeModuleInContext2 problem
...leRef ir_lib_module;
> bool flag;
>
> printf("loading IR library from path: %s\n", path);
>
> LLVMCreateMemoryBufferWithContentsOfFile(path, &module, &error);
>
> global_context = LLVMGetGlobalContext();
>
> flag = LLVMGetBitcodeModuleInContext2(global_context, module,
> &ir_lib_module);
>
> printf("LLVMGetBitcodeModuleInContext2() returned %d\n", flag);
>
> LLVMVerifyModule(ir_lib_module, LLVMAbortProcessAction, &error);
> LLVMDumpModule(ir_lib_module);
>
> if (LLVM...
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 = LLVMCreate...
2017 Mar 08
2
LLVMGetBitcodeModuleInContext2 problem
...nge(path,
> strlen(path), "path", 1);
>
LLVMCreateMemoryBufferWithContentsOfFile takes a path.
Erm...no...the code is calling LLVMCreateMemoryBufferWithMemoryRange, not
LLVMCreateMemoryBufferWithContentsOfFile...
Or do you mean I need to load the module into memory before calling
LLVMGetBitcodeModuleInContext2?
Toshi
On Wed, Mar 8, 2017 at 3:40 PM, Friedman, Eli <efriedma at codeaurora.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.
&...