From 9759a273fd6791963b60db369a3c0723e8dbcc1a Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Mon, 9 Feb 2015 07:22:56 +0000 Subject: [PATCH] [Orc] Tweak lambda capture lists to try to avoid an ICE on gcc-4.7.2. NFC. 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 | 2 +- include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h b/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h index a56f8b6f9a2..556856d95e4 100644 --- a/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h +++ b/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h @@ -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) { diff --git a/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h b/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h index ce306e67dde..f9cb285927e 100644 --- a/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h +++ b/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h @@ -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) -- 2.34.1