[Orc] Lambda needs to capture 'this'.
[oota-llvm.git] / include / llvm / ExecutionEngine / Orc / CompileOnDemandLayer.h
index 926c1a76b5a541c7c78bca910505fd33d5f01b25..9e6eb8032b1f9614dade6205563a8b15ee5b609f 100644 (file)
@@ -232,7 +232,7 @@ private:
     // Initializers may refer to functions declared (but not defined) in this
     // module. Build a materializer to clone decls on demand.
     auto Materializer = createLambdaMaterializer(
-      [&GVsM, &LMResources](Value *V) -> Value* {
+      [this, &GVsM, &LMResources](Value *V) -> Value* {
         if (auto *F = dyn_cast<Function>(V)) {
           // Decls in the original module just get cloned.
           if (F->isDeclaration())