summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-08-11 16:30:02 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-08-11 16:30:02 +0000
commite984e73e538ddaa390659357b6ed6fec7e41fa7c (patch)
tree57b9156c7479d76634e0cf83298eea53d0af53d3 /source
parent39be7ce23363d12ae3e49aeb1fdb2bfeb892e836 (diff)
Notes
Diffstat (limited to 'source')
-rw-r--r--source/Utility/VMRange.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/Utility/VMRange.cpp b/source/Utility/VMRange.cpp
index 105b1a58c48c4..7e35d3ef0c65b 100644
--- a/source/Utility/VMRange.cpp
+++ b/source/Utility/VMRange.cpp
@@ -24,14 +24,16 @@ using namespace lldb_private;
bool VMRange::ContainsValue(const VMRange::collection &coll,
lldb::addr_t value) {
- ValueInRangeUnaryPredicate in_range_predicate(value);
- return llvm::find_if(coll, in_range_predicate) != coll.end();
+ return llvm::find_if(coll, [&](const VMRange &r) {
+ return r.Contains(value);
+ }) != coll.end();
}
bool VMRange::ContainsRange(const VMRange::collection &coll,
const VMRange &range) {
- RangeInRangeUnaryPredicate in_range_predicate(range);
- return llvm::find_if(coll, in_range_predicate) != coll.end();
+ return llvm::find_if(coll, [&](const VMRange &r) {
+ return r.Contains(range);
+ }) != coll.end();
}
void VMRange::Dump(Stream *s, lldb::addr_t offset, uint32_t addr_width) const {