Skip to content

Commit 75d11fb

Browse files
committed
NFC: remove two instances of deprecated capture
``` warning: implicit capture of 'this' with a capture default of '=' is deprecated [-Wdeprecated-this-capture] ```
1 parent d26ea02 commit 75d11fb

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

llvm/lib/Support/Parallel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class ThreadPoolExecutor : public Executor {
6060
auto &Thread0 = Threads[0];
6161
Thread0 = std::thread([this, S] {
6262
for (unsigned I = 1; I < ThreadCount; ++I) {
63-
Threads.emplace_back([=] { work(S, I); });
63+
Threads.emplace_back([this, S, I] { work(S, I); });
6464
if (Stop)
6565
break;
6666
}

mlir/lib/Transforms/InlinerPass.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,10 @@ void InlinerPass::runOnOperation() {
138138
}
139139

140140
// By default, assume that any inlining is profitable.
141-
auto profitabilityCb = [=](const Inliner::ResolvedCall &call) {
142-
return isProfitableToInline(call, inliningThreshold);
143-
};
141+
auto profitabilityCb =
142+
[this, inliningThreshold](const Inliner::ResolvedCall &call) {
143+
return isProfitableToInline(call, inliningThreshold);
144+
};
144145

145146
// Get an instance of the inliner.
146147
Inliner inliner(op, cg, *this, getAnalysisManager(), runPipelineHelper,

0 commit comments

Comments
 (0)