Displaying 1 result from an estimated 1 matches for "takecontext".
Did you mean:
makecontext
2019 Sep 19
3
"corrupted size vs. prev_size" when calling ExecutionSession::lookup()
...f (llvm::verifyModule(*AST::getModule(), &llvm::errs())) {
return 0;
} else {
std::cout << "Verified success\n";
}
// run the generated IR code
llvm::cantFail(CompileLayer.add(ES.getMainJITDylib(),
llvm::orc::ThreadSafeModule(std::move(AST::takeModule()),
AST::takeContext())));
auto symbol = llvm::cantFail(ES.lookup({&ES.getMainJITDylib()},
Mangle("main")));
int (*entry)() = (decltype(entry)) symbol.getAddress();
std::cout << entry() << std::endl;
and the "corrupted size vs. prev_size" will happen if the IR code is this:...