@@ -31,7 +31,7 @@ void BalancedPartitioning::BPThreadPool::async(Func &&F) {
31
31
#if LLVM_ENABLE_THREADS
32
32
// This new thread could spawn more threads, so mark it as active
33
33
++NumActiveThreads;
34
- TheThreadPool.async ([= ]() {
34
+ TheThreadPool.async ([this , F ]() {
35
35
// Run the task
36
36
F ();
37
37
@@ -93,7 +93,7 @@ void BalancedPartitioning::run(std::vector<BPFunctionNode> &Nodes) const {
93
93
Nodes[I].InputOrderIndex = I;
94
94
95
95
auto NodesRange = llvm::make_range (Nodes.begin (), Nodes.end ());
96
- auto BisectTask = [= , &TP]() {
96
+ auto BisectTask = [this , NodesRange , &TP]() {
97
97
bisect (NodesRange, /* RecDepth=*/ 0 , /* RootBucket=*/ 1 , /* Offset=*/ 0 , TP);
98
98
};
99
99
if (TP) {
@@ -147,10 +147,11 @@ void BalancedPartitioning::bisect(const FunctionNodeRange Nodes,
147
147
auto LeftNodes = llvm::make_range (Nodes.begin (), NodesMid);
148
148
auto RightNodes = llvm::make_range (NodesMid, Nodes.end ());
149
149
150
- auto LeftRecTask = [= , &TP]() {
150
+ auto LeftRecTask = [this , LeftNodes, RecDepth, LeftBucket, Offset , &TP]() {
151
151
bisect (LeftNodes, RecDepth + 1 , LeftBucket, Offset, TP);
152
152
};
153
- auto RightRecTask = [=, &TP]() {
153
+ auto RightRecTask = [this , RightNodes, RecDepth, RightBucket, MidOffset,
154
+ &TP]() {
154
155
bisect (RightNodes, RecDepth + 1 , RightBucket, MidOffset, TP);
155
156
};
156
157
0 commit comments