[Polly] Use llvm::function_ref. NFC.

As suggested by David Blaike at
https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20200824/822584.html

GitOrigin-RevId: c971b53b22a5cd43b54bf4773fe3c59ea1b805fb
diff --git a/include/polly/ScopInfo.h b/include/polly/ScopInfo.h
index b6fcddc..5d18582 100644
--- a/include/polly/ScopInfo.h
+++ b/include/polly/ScopInfo.h
@@ -2319,7 +2319,7 @@
   ///                      ScopBuilder::buildAccessRelations. Therefore, if this
   ///                      method is called before buildAccessRelations, false
   ///                      must be passed.
-  void removeStmts(std::function<bool(ScopStmt &)> ShouldDelete,
+  void removeStmts(function_ref<bool(ScopStmt &)> ShouldDelete,
                    bool AfterHoisting = true);
 
   /// Get an isl string representing the context.
diff --git a/lib/Analysis/ScopInfo.cpp b/lib/Analysis/ScopInfo.cpp
index fdb06be..a50e1a7 100644
--- a/lib/Analysis/ScopInfo.cpp
+++ b/lib/Analysis/ScopInfo.cpp
@@ -1752,7 +1752,7 @@
   }
 }
 
-void Scop::removeStmts(std::function<bool(ScopStmt &)> ShouldDelete,
+void Scop::removeStmts(function_ref<bool(ScopStmt &)> ShouldDelete,
                        bool AfterHoisting) {
   for (auto StmtIt = Stmts.begin(), StmtEnd = Stmts.end(); StmtIt != StmtEnd;) {
     if (!ShouldDelete(*StmtIt)) {