[Orc] Lambda needs to capture 'this'.
authorLang Hames <lhames@gmail.com>
Mon, 19 Oct 2015 17:53:43 +0000 (17:53 +0000)
committerLang Hames <lhames@gmail.com>
Mon, 19 Oct 2015 17:53:43 +0000 (17:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250716 91177308-0d34-0410-b5e6-96231b3b80d8

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())