summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/SROA.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-03-03 19:28:52 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-03-03 19:28:52 +0000
commit0550e93e89b20192b90dc1e886fed1f1bafd45e6 (patch)
treebdce29f7dbcb680f28d83bf604fe27298b5a0591 /lib/Transforms/Scalar/SROA.cpp
parent6f8c0c061331324faef1fdb6e39724045fc7a140 (diff)
downloadllvm-0550e93e89b20192b90dc1e886fed1f1bafd45e6.tar.gz
llvm-0550e93e89b20192b90dc1e886fed1f1bafd45e6.tar.bz2
llvm-0550e93e89b20192b90dc1e886fed1f1bafd45e6.tar.xz
[C++11] Remove the completely unnecessary requirement on SetVector's
remove_if that its predicate is adaptable. We don't actually need this, we can write a generic adapter for any predicate. This lets us remove some very wrong std::function usages. We should never be using std::function for predicates to algorithms. This incurs an *indirect* call overhead for every evaluation of the predicate, and makes it very hard to inline through. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202742 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/SROA.cpp')
-rw-r--r--lib/Transforms/Scalar/SROA.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/SROA.cpp b/lib/Transforms/Scalar/SROA.cpp
index 3c245e4bd5..1dc83dad22 100644
--- a/lib/Transforms/Scalar/SROA.cpp
+++ b/lib/Transforms/Scalar/SROA.cpp
@@ -3640,7 +3640,7 @@ bool SROA::runOnFunction(Function &F) {
// Remove the deleted allocas from various lists so that we don't try to
// continue processing them.
if (!DeletedAllocas.empty()) {
- std::function<bool(AllocaInst *)> IsInSet = [&](AllocaInst *AI) {
+ auto IsInSet = [&](AllocaInst *AI) {
return DeletedAllocas.count(AI);
};
Worklist.remove_if(IsInSet);