1 | //===-- AddressRangeListImpl.h ----------------------------------*- C++ -*-===// |
---|---|
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #ifndef LLDB_CORE_ADDRESSRANGELISTIMPL_H |
10 | #define LLDB_CORE_ADDRESSRANGELISTIMPL_H |
11 | |
12 | #include "lldb/Core/AddressRange.h" |
13 | #include <cstddef> |
14 | |
15 | namespace lldb { |
16 | class SBAddressRangeList; |
17 | class SBBlock; |
18 | class SBProcess; |
19 | } |
20 | |
21 | namespace lldb_private { |
22 | |
23 | class AddressRangeListImpl { |
24 | public: |
25 | AddressRangeListImpl(); |
26 | |
27 | explicit AddressRangeListImpl(AddressRanges ranges) |
28 | : m_ranges(std::move(ranges)) {} |
29 | |
30 | size_t GetSize() const; |
31 | |
32 | void Reserve(size_t capacity); |
33 | |
34 | void Append(const AddressRange &sb_region); |
35 | |
36 | void Append(const AddressRangeListImpl &list); |
37 | |
38 | void Clear(); |
39 | |
40 | lldb_private::AddressRange GetAddressRangeAtIndex(size_t index); |
41 | |
42 | private: |
43 | friend class lldb::SBAddressRangeList; |
44 | friend class lldb::SBBlock; |
45 | friend class lldb::SBProcess; |
46 | |
47 | AddressRanges &ref(); |
48 | |
49 | AddressRanges m_ranges; |
50 | }; |
51 | |
52 | } // namespace lldb_private |
53 | |
54 | #endif // LLDB_CORE_ADDRESSRANGE_H |
55 |