]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/lldb/include/lldb/Core/ValueObjectConstResultChild.h
MFC r355940:
[FreeBSD/FreeBSD.git] / contrib / llvm-project / lldb / include / lldb / Core / ValueObjectConstResultChild.h
1 //===-- ValueObjectConstResultChild.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 liblldb_ValueObjectConstResultChild_h_
10 #define liblldb_ValueObjectConstResultChild_h_
11
12 #include "lldb/Core/ValueObjectChild.h"
13 #include "lldb/Core/ValueObjectConstResultImpl.h"
14 #include "lldb/Symbol/CompilerType.h"
15 #include "lldb/Utility/ConstString.h"
16 #include "lldb/lldb-defines.h"
17 #include "lldb/lldb-forward.h"
18 #include "lldb/lldb-types.h"
19
20 #include <stddef.h>
21 #include <stdint.h>
22
23 namespace lldb_private {
24 class DataExtractor;
25 class Status;
26 class ValueObject;
27
28 // A child of a ValueObjectConstResult.
29 class ValueObjectConstResultChild : public ValueObjectChild {
30 public:
31   ValueObjectConstResultChild(ValueObject &parent,
32                               const CompilerType &compiler_type,
33                               ConstString name, uint32_t byte_size,
34                               int32_t byte_offset, uint32_t bitfield_bit_size,
35                               uint32_t bitfield_bit_offset, bool is_base_class,
36                               bool is_deref_of_parent,
37                               lldb::addr_t live_address,
38                               uint64_t language_flags);
39
40   ~ValueObjectConstResultChild() override;
41
42   lldb::ValueObjectSP Dereference(Status &error) override;
43
44   ValueObject *CreateChildAtIndex(size_t idx, bool synthetic_array_member,
45                                   int32_t synthetic_index) override;
46
47   virtual CompilerType GetCompilerType() {
48     return ValueObjectChild::GetCompilerType();
49   }
50
51   lldb::ValueObjectSP GetSyntheticChildAtOffset(
52       uint32_t offset, const CompilerType &type, bool can_create,
53       ConstString name_const_str = ConstString()) override;
54
55   lldb::ValueObjectSP AddressOf(Status &error) override;
56
57   lldb::addr_t GetAddressOf(bool scalar_is_load_address = true,
58                             AddressType *address_type = nullptr) override;
59
60   size_t GetPointeeData(DataExtractor &data, uint32_t item_idx = 0,
61                         uint32_t item_count = 1) override;
62
63   lldb::ValueObjectSP Cast(const CompilerType &compiler_type) override;
64
65 protected:
66   ValueObjectConstResultImpl m_impl;
67
68 private:
69   friend class ValueObject;
70   friend class ValueObjectConstResult;
71   friend class ValueObjectConstResultImpl;
72
73   DISALLOW_COPY_AND_ASSIGN(ValueObjectConstResultChild);
74 };
75
76 } // namespace lldb_private
77
78 #endif // liblldb_ValueObjectConstResultChild_h_