[ORC] Try to work around a GCC 4.7 bug triggered by r267457.
authorLang Hames <lhames@gmail.com>
Tue, 26 Apr 2016 01:27:54 +0000 (01:27 +0000)
committerLang Hames <lhames@gmail.com>
Tue, 26 Apr 2016 01:27:54 +0000 (01:27 +0000)
llvm-svn: 267510

llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h

index 75bda1d..4ba41e3 100644 (file)
@@ -742,11 +742,16 @@ private:
     if (ExistingError)
       return std::move(ExistingError);
 
+    // FIXME: CompileCallback could be an anonymous lambda defined at the use
+    //        site below, but that triggers a GCC 4.7 ICE. When we move off
+    //        GCC 4.7, tidy this up.
+    auto CompileCallback =
+      [this](TargetAddress Addr) -> Expected<TargetAddress> {
+        return this->CallbackManager->executeCompileCallback(Addr);
+      };
+
     if (Id == RequestCompileId) {
-      if (auto Err = handle<RequestCompile>(
-              C, [&](TargetAddress Addr) -> Expected<TargetAddress> {
-                return CallbackManager->executeCompileCallback(Addr);
-              }))
+      if (auto Err = handle<RequestCompile>(C, CompileCallback))
         return Err;
       return Error::success();
     }