[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.

llvm-svn: 228567

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

index a56f8b6..556856d 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 ce306e6..f9cb285 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)