summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2017-05-08 20:44:01 +0000
committerDavide Italiano <davide@freebsd.org>2017-05-08 20:44:01 +0000
commitaa42a100513a040a2e8276287011a36c7e042e7b (patch)
treeac197316ee4eaa6ed49678a53b9baa2caa42d754 /llvm
parent4a3751ff246394755e113f162435829b7d67d6ed (diff)
downloadbcm5719-llvm-aa42a100513a040a2e8276287011a36c7e042e7b.tar.gz
bcm5719-llvm-aa42a100513a040a2e8276287011a36c7e042e7b.zip
[PartialInlining] Capture by reference rather than by value.
llvm-svn: 302464
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Transforms/IPO/PartialInlining.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/PartialInlining.cpp b/llvm/lib/Transforms/IPO/PartialInlining.cpp
index 2db47b3b562..46c6e092d78 100644
--- a/llvm/lib/Transforms/IPO/PartialInlining.cpp
+++ b/llvm/lib/Transforms/IPO/PartialInlining.cpp
@@ -157,7 +157,7 @@ PartialInlinerImpl::computeOutliningInfo(Function *F) {
return isa<ReturnInst>(TI);
};
- auto GetReturnBlock = [=](BasicBlock *Succ1, BasicBlock *Succ2) {
+ auto GetReturnBlock = [&](BasicBlock *Succ1, BasicBlock *Succ2) {
if (IsReturnBlock(Succ1))
return std::make_tuple(Succ1, Succ2);
if (IsReturnBlock(Succ2))
@@ -167,7 +167,7 @@ PartialInlinerImpl::computeOutliningInfo(Function *F) {
};
// Detect a triangular shape:
- auto GetCommonSucc = [=](BasicBlock *Succ1, BasicBlock *Succ2) {
+ auto GetCommonSucc = [&](BasicBlock *Succ1, BasicBlock *Succ2) {
if (IsSuccessor(Succ1, Succ2))
return std::make_tuple(Succ1, Succ2);
if (IsSuccessor(Succ2, Succ1))
@@ -423,7 +423,7 @@ Function *PartialInlinerImpl::unswitchFunction(Function *F) {
// Returns true if the block is to be partial inlined into the caller
// (i.e. not to be extracted to the out of line function)
- auto ToBeInlined = [=](BasicBlock *BB) {
+ auto ToBeInlined = [&](BasicBlock *BB) {
return BB == NewReturnBlock || NewEntries.count(BB);
};
// Gather up the blocks that we're going to extract.
OpenPOWER on IntegriCloud