From owner-svn-src-all@freebsd.org Sat Aug 11 16:30:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B68B610727E5; Sat, 11 Aug 2018 16:30:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 59F86864F0; Sat, 11 Aug 2018 16:30:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 617AD19ACB; Sat, 11 Aug 2018 16:30:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7BGU3VR020488; Sat, 11 Aug 2018 16:30:03 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7BGU3lv020486; Sat, 11 Aug 2018 16:30:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201808111630.w7BGU3lv020486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 11 Aug 2018 16:30:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r337641 - in vendor/lldb/dist-release_70: include/lldb/Utility source/Utility X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/lldb/dist-release_70: include/lldb/Utility source/Utility X-SVN-Commit-Revision: 337641 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Aug 2018 16:30:07 -0000 Author: dim Date: Sat Aug 11 16:30:02 2018 New Revision: 337641 URL: https://svnweb.freebsd.org/changeset/base/337641 Log: Vendor import of lldb release_70 branch r339355: https://llvm.org/svn/llvm-project/lldb/branches/release_70@339355 Modified: vendor/lldb/dist-release_70/include/lldb/Utility/VMRange.h vendor/lldb/dist-release_70/source/Utility/VMRange.cpp Modified: vendor/lldb/dist-release_70/include/lldb/Utility/VMRange.h ============================================================================== --- vendor/lldb/dist-release_70/include/lldb/Utility/VMRange.h Sat Aug 11 16:29:59 2018 (r337640) +++ vendor/lldb/dist-release_70/include/lldb/Utility/VMRange.h Sat Aug 11 16:30:02 2018 (r337641) @@ -87,24 +87,6 @@ class VMRange { (public) void Dump(Stream *s, lldb::addr_t base_addr = 0, uint32_t addr_width = 8) const; - class ValueInRangeUnaryPredicate { - public: - ValueInRangeUnaryPredicate(lldb::addr_t value) : _value(value) {} - bool operator()(const VMRange &range) const { - return range.Contains(_value); - } - lldb::addr_t _value; - }; - - class RangeInRangeUnaryPredicate { - public: - RangeInRangeUnaryPredicate(VMRange range) : _range(range) {} - bool operator()(const VMRange &range) const { - return range.Contains(_range); - } - const VMRange &_range; - }; - static bool ContainsValue(const VMRange::collection &coll, lldb::addr_t value); Modified: vendor/lldb/dist-release_70/source/Utility/VMRange.cpp ============================================================================== --- vendor/lldb/dist-release_70/source/Utility/VMRange.cpp Sat Aug 11 16:29:59 2018 (r337640) +++ vendor/lldb/dist-release_70/source/Utility/VMRange.cpp Sat Aug 11 16:30:02 2018 (r337641) @@ -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 {