Displaying 1 result from an estimated 1 matches for "lambdaretvar".
2015 Oct 27
3
Add a mapping to a C++ lambda
...unction>(M->getOrInsertFunction("main",
Type::getInt32Ty(Context), (Type *) 0));
BasicBlock *BB = BasicBlock::Create(Context, "EntryBlock", mainF);
IRBuilder<> builder(BB);
CallInst *lambdaRes = builder.CreateCall(lambdaFN, std::vector<Value
*>(), "lambdaRetVar");
builder.CreateRet(lambdaRes);
ExecutionEngine *EE = EngineBuilder(std::move(Owner)).create();
EE->addGlobalMapping(lambdaFN, &lambdaBody);
outs() << "We just constructed this LLVM module:\n\n" << *M;
outs() << "\n\nRunning main: ";...