summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/Support/ThreadPool.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/include/llvm/Support/ThreadPool.h b/llvm/include/llvm/Support/ThreadPool.h
index 85c062179f0..5648db0642a 100644
--- a/llvm/include/llvm/Support/ThreadPool.h
+++ b/llvm/include/llvm/Support/ThreadPool.h
@@ -70,7 +70,12 @@ public:
#ifndef _MSC_VER
return asyncImpl(std::move(Task));
#else
- return asyncImpl([Task] (VoidTy) -> VoidTy { Task(); return VoidTy(); });
+ // This lambda has to be marked mutable because MSVC 2013's std::bind call
+ // operator isn't const qualified.
+ return asyncImpl([Task](VoidTy) mutable -> VoidTy {
+ Task();
+ return VoidTy();
+ });
#endif
}
OpenPOWER on IntegriCloud