1 //===-- ValueObjectConstResultChild.h ----------------------------*- C++-*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef liblldb_ValueObjectConstResultChild_h_
10 #define liblldb_ValueObjectConstResultChild_h_
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"
23 namespace lldb_private {
28 // A child of a ValueObjectConstResult.
29 class ValueObjectConstResultChild : public ValueObjectChild {
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);
40 ~ValueObjectConstResultChild() override;
42 lldb::ValueObjectSP Dereference(Status &error) override;
44 ValueObject *CreateChildAtIndex(size_t idx, bool synthetic_array_member,
45 int32_t synthetic_index) override;
47 virtual CompilerType GetCompilerType() {
48 return ValueObjectChild::GetCompilerType();
51 lldb::ValueObjectSP GetSyntheticChildAtOffset(
52 uint32_t offset, const CompilerType &type, bool can_create,
53 ConstString name_const_str = ConstString()) override;
55 lldb::ValueObjectSP AddressOf(Status &error) override;
57 lldb::addr_t GetAddressOf(bool scalar_is_load_address = true,
58 AddressType *address_type = nullptr) override;
60 size_t GetPointeeData(DataExtractor &data, uint32_t item_idx = 0,
61 uint32_t item_count = 1) override;
63 lldb::ValueObjectSP Cast(const CompilerType &compiler_type) override;
66 ValueObjectConstResultImpl m_impl;
69 friend class ValueObject;
70 friend class ValueObjectConstResult;
71 friend class ValueObjectConstResultImpl;
73 DISALLOW_COPY_AND_ASSIGN(ValueObjectConstResultChild);
76 } // namespace lldb_private
78 #endif // liblldb_ValueObjectConstResultChild_h_