From dcf23ddbcbf0b28770ecc41696faf98ab408a6ec Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Mon, 3 Mar 2014 19:49:02 +0000 Subject: [PATCH] [C++11] Remove a leftover std::function instance. It's not needed anymore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202748 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/DeadStoreElimination.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Transforms/Scalar/DeadStoreElimination.cpp b/lib/Transforms/Scalar/DeadStoreElimination.cpp index a170e42bc26..43d812c3c93 100644 --- a/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -871,10 +871,9 @@ void DSE::RemoveAccessedObjects(const AliasAnalysis::Location &LoadedLoc, } // Remove objects that could alias LoadedLoc. - std::function Pred = [&](Value *I) { + DeadStackObjects.remove_if([&](Value *I) { // See if the loaded location could alias the stack location. AliasAnalysis::Location StackLoc(I, getPointerSize(I, *AA)); return !AA->isNoAlias(StackLoc, LoadedLoc); - }; - DeadStackObjects.remove_if(Pred); + }); }