search for: llvmabortprocessaction

Displaying 5 results from an estimated 5 matches for "llvmabortprocessaction".

2017 Mar 09
2
LLVMGetBitcodeModuleInContext2 problem
...t; 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 (LLVMCreateExecutionEngineForModule(&engine, ir_lib_module, > &error) != 0) { > fprintf(stderr, "failed to create execution engine\n"); > abort(); > }...
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: > > >>
2016 Dec 18
3
LLD status update and performance chart
...anybody aware of a program that uses LLVM as > a library, produces IR in memory, runs the verifier, and does not simply > abort if the verifier fails in non-development builds? > I'm doing the same as clang: #ifndef NDEBUG char *error = nullptr; LLVMVerifyModule(g->module, LLVMAbortProcessAction, &error); #endif However the LLVM API is defined such that trying to call codegen functions on an invalid module is undefined, and aborting in this case makes sense. This is really just a more sophisticated assert(). I'm a fan of assert(); I like having assertions on during development. I...
2017 Jan 25
2
mcjit C interface problems
...sum, "entry"); LLVMBuilderRef builder = LLVMCreateBuilder(); LLVMPositionBuilderAtEnd(builder, entry); LLVMValueRef tmp = LLVMBuildAdd(builder, LLVMGetParam(sum, 0), LLVMGetParam(sum, 1), "tmp"); LLVMBuildRet(builder, tmp); char* error = NULL; LLVMVerifyModule(mod, LLVMAbortProcessAction, &error); LLVMDisposeMessage(error); LLVMExecutionEngineRef engine; error = NULL; LLVMLinkInMCJIT(); LLVMInitializeNativeTarget(); LLVMInitializeNativeAsmPrinter(); LLVMInitializeNativeAsmParser(); if (LLVMCreateExecutionEngineForModule(&engine, mod, &error) != 0) {...
2016 Dec 18
0
LLD status update and performance chart
On Fri, Dec 16, 2016 at 12:31 PM, Pete Cooper via llvm-dev < llvm-dev at lists.llvm.org> wrote: > > On Dec 16, 2016, at 11:46 AM, Rui Ueyama <ruiu at google.com> wrote: > > On Fri, Dec 16, 2016 at 11:18 AM, Pete Cooper <peter_cooper at apple.com> > wrote: > >> Hi Rui >> >> I agree separating the components out in to libraries only makes sense