search for: moduleorerr

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

2014 Mar 20
2
[LLVMdev] load bytecode from string for jiting problem
...std::cout << "0xc0 ok\n"; if (sr.str()[3] == (char) 0xde) std::cout << "0xde ok\n"; llvm::MemoryBuffer* mbjit = llvm::MemoryBuffer::getMemBufferCopy (sr); llvm::ErrorOr<llvm::Module*> ModuleOrErr = llvm::parseBitcodeFile (mbjit, context); if (llvm::error_code EC = ModuleOrErr.getError()) { std::cout << ModuleOrErr.getError().message() << "\n"; } Module* Mjit = ModuleOrErr.get(); std::string eeError; ExecutionEngine* nee = EngineBuilder(Mjit).setEngineKind(Engi...
2014 Mar 19
2
[LLVMdev] load bytecode from string for jiting problem
...emorybuffer that you pass in parseBitcodeFile. If what Will is saying is true, there is something wrong with your code in "3:", i.e.: > > MemoryBuffer* mbjit = MemoryBuffer::getMemBuffer (sr.str()); > LLVMContext& context = getGlobalContext(); > ErrorOr<Module*> ModuleOrErr = parseBitcodeFile (mbjit, context); > if (error_code EC = ModuleOrErr.getError()) > { > std::cout << ModuleOrErr.getError(). > message() << "\n"; > assert(false); > } > > Can you post how you modified it in your second reply? For debuggi...
2014 Mar 20
2
[LLVMdev] load bytecode from string for jiting problem
...>> if (sr.str()[3] == (char) 0xde) >> std::cout << "0xde ok\n"; >> llvm::MemoryBuffer* mbjit = llvm::MemoryBuffer::getMemBufferCopy (sr); >> >> llvm::ErrorOr<llvm::Module*> ModuleOrErr = llvm::parseBitcodeFile >> (mbjit, context); >> if (llvm::error_code EC = ModuleOrErr.getError()) { >> std::cout << ModuleOrErr.getError().message() << "\n"; >> } >> >> Module* Mjit = ModuleOrErr.get(); >> >> std::string eeError...
2014 Mar 19
2
[LLVMdev] load bytecode from string for jiting problem
...ode buffer "string" is > null-terminated or not. If not, be sure to be careful and > do things like informing MemoryBuffer that this is the case. > > Hope this helps, > ~Will > >> LLVMContext& context = getGlobalContext(); >> ErrorOr<Module*> ModuleOrErr = parseBitcodeFile (mbjit, context); >> if (error_code EC = ModuleOrErr.getError()) >> { >> std::cout << ModuleOrErr.getError().message() << "\n"; >> assert(false); >> } >> >> >> >> >> This is the e...
2014 Mar 13
2
[LLVMdev] load bytecode from string for jiting problem
...) 0xc0) std::cout << "0xc0 ok\n"; if (sr.str()[3] == (char) 0xde) std::cout << "0xde ok\n"; 3) I try to parse the gv by MemoryBuffer* mbjit = MemoryBuffer::getMemBuffer (sr.str()); LLVMContext& context = getGlobalContext(); ErrorOr<Module*> ModuleOrErr = parseBitcodeFile (mbjit, context); if (error_code EC = ModuleOrErr.getError()) { std::cout << ModuleOrErr.getError().message() << "\n"; assert(false); } This is the execution result: B ok C ok 0xc0 ok 0xde ok Invalid bitcode signature Ok is not working :...