Displaying 1 result from an estimated 1 matches for "lambdaft".
Did you mean:
lambdafn
2015 Oct 27
3
Add a mapping to a C++ lambda
...agedStatic.h"#include "llvm/Support/TargetSelect.h"
using namespace llvm;
int main() {
InitializeNativeTarget();
LLVMContext Context;
std::unique_ptr<Module> Owner = make_unique<Module>("SomeModule", Context);
Module *M = Owner.get();
FunctionType *lambdaFT = FunctionType::get(Type::getInt32Ty(Context), false);
Function *lambdaFN = Function::Create(lambdaFT,
Function::ExternalLinkage, "lambda", Owner.get());
auto lambdaBody = []() { return 100; };
Function *mainF = cast<Function>(M->getOrInsertFunction("main",
Type:...