diff options
| author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-12-01 07:49:23 +0000 |
|---|---|---|
| committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-12-01 07:49:23 +0000 |
| commit | ff3b8b4c33e0eed67072b8f7279b22d90b5b4747 (patch) | |
| tree | 5dea24f63c8eb45a5547afebf90dd7104d79d6f2 /llvm/tools | |
| parent | 5ec97a7b9b0dc633bb79453971287ac8662f7813 (diff) | |
| download | bcm5719-llvm-ff3b8b4c33e0eed67072b8f7279b22d90b5b4747.tar.gz bcm5719-llvm-ff3b8b4c33e0eed67072b8f7279b22d90b5b4747.zip | |
Introduce a range version of std::any_of, and use it in SCEV
Reviewers: dblaikie, pcc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D15063
llvm-svn: 254390
Diffstat (limited to 'llvm/tools')
| -rw-r--r-- | llvm/tools/llvm-pdbdump/LinePrinter.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/tools/llvm-pdbdump/LinePrinter.cpp b/llvm/tools/llvm-pdbdump/LinePrinter.cpp index 4f3ee54c769..a43727f02b5 100644 --- a/llvm/tools/llvm-pdbdump/LinePrinter.cpp +++ b/llvm/tools/llvm-pdbdump/LinePrinter.cpp @@ -11,15 +11,12 @@ #include "llvm-pdbdump.h" +#include "llvm/ADT/STLExtras.h" #include "llvm/Support/Regex.h" #include <algorithm> namespace { -template <class T, class Pred> bool any_of_range(T &&R, Pred P) { - return std::any_of(R.begin(), R.end(), P); -} - bool IsItemExcluded(llvm::StringRef Item, std::list<llvm::Regex> &IncludeFilters, std::list<llvm::Regex> &ExcludeFilters) { @@ -30,10 +27,10 @@ bool IsItemExcluded(llvm::StringRef Item, // Include takes priority over exclude. If the user specified include // filters, and none of them include this item, them item is gone. - if (!IncludeFilters.empty() && !any_of_range(IncludeFilters, match_pred)) + if (!IncludeFilters.empty() && !any_of(IncludeFilters, match_pred)) return true; - if (any_of_range(ExcludeFilters, match_pred)) + if (any_of(ExcludeFilters, match_pred)) return true; return false; |

