[Orc] Tweak lambda capture lists to try to avoid an ICE on gcc-4.7.2. NFC.
authorLang Hames <lhames@gmail.com>
Mon, 9 Feb 2015 07:22:56 +0000 (07:22 +0000)
committerLang Hames <lhames@gmail.com>
Mon, 9 Feb 2015 07:22:56 +0000 (07:22 +0000)
Apparently gcc-4.7.2 is touchy about 'this' appearing in a lambda capture list
along with other captures. I've rewritten my captures to try to avoid the issue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228567 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h
include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h

index a56f8b6f9a26c30463f3393530ac8e3af86fae83..556856d95e447e666f19eb89f3d220fa36a6819f 100644 (file)
@@ -44,7 +44,7 @@ private:
       case NotEmitted:
         if (provides(Name, ExportedSymbolsOnly))
           return JITSymbol(
-              [this,ExportedSymbolsOnly,Name,&B]() -> TargetAddress {
+              [=,&B]() -> TargetAddress {
                 if (EmitState == Emitting)
                   return 0;
                 else if (EmitState != Emitted) {
index ce306e67dde5c4a7f5dc4777a05eafa6facf1231..f9cb285927ebaea51de906817119f2ca53e2ba47 100644 (file)
@@ -221,7 +221,7 @@ public:
                          bool ExportedSymbolsOnly) {
     if (auto Addr = H->getSymbolAddress(Name, ExportedSymbolsOnly))
       return JITSymbol(
-        [this, Addr, H](){
+        [=](){
           if (H->NeedsFinalization()) {
             H->Finalize();
             if (NotifyFinalized)