xref: /freebsd/contrib/llvm-project/lldb/include/lldb/Core/AddressRangeListImpl.h (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
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   AddressRangeListImpl(const AddressRangeListImpl &rhs) = default;
28 
29   AddressRangeListImpl &operator=(const AddressRangeListImpl &rhs);
30 
31   size_t GetSize() const;
32 
33   void Reserve(size_t capacity);
34 
35   void Append(const AddressRange &sb_region);
36 
37   void Append(const AddressRangeListImpl &list);
38 
39   void Clear();
40 
41   lldb_private::AddressRange GetAddressRangeAtIndex(size_t index);
42 
43 private:
44   friend class lldb::SBAddressRangeList;
45   friend class lldb::SBBlock;
46   friend class lldb::SBProcess;
47 
48   AddressRanges &ref();
49 
50   AddressRanges m_ranges;
51 };
52 
53 } // namespace lldb_private
54 
55 #endif // LLDB_CORE_ADDRESSRANGE_H
56