1cfca06d7SDimitry Andric //===-- ValueObjectConstResultChild.cpp -----------------------------------===//
2f034231aSEd Maste //
35f29bb8aSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
45f29bb8aSDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
55f29bb8aSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6f034231aSEd Maste //
7f034231aSEd Maste //===----------------------------------------------------------------------===//
8f034231aSEd Maste
9f034231aSEd Maste #include "lldb/Core/ValueObjectConstResultChild.h"
10f034231aSEd Maste
1194994d37SDimitry Andric #include "lldb/lldb-private-enumerations.h"
1274a628f7SDimitry Andric namespace lldb_private {
1374a628f7SDimitry Andric class DataExtractor;
1474a628f7SDimitry Andric }
1574a628f7SDimitry Andric namespace lldb_private {
16b76161e4SDimitry Andric class Status;
1774a628f7SDimitry Andric }
1874a628f7SDimitry Andric namespace lldb_private {
1974a628f7SDimitry Andric class ValueObject;
2074a628f7SDimitry Andric }
21f034231aSEd Maste
22f034231aSEd Maste using namespace lldb_private;
23f034231aSEd Maste
ValueObjectConstResultChild(ValueObject & parent,const CompilerType & compiler_type,ConstString name,uint32_t byte_size,int32_t byte_offset,uint32_t bitfield_bit_size,uint32_t bitfield_bit_offset,bool is_base_class,bool is_deref_of_parent,lldb::addr_t live_address,uint64_t language_flags)2414f1b3e8SDimitry Andric ValueObjectConstResultChild::ValueObjectConstResultChild(
2514f1b3e8SDimitry Andric ValueObject &parent, const CompilerType &compiler_type,
265f29bb8aSDimitry Andric ConstString name, uint32_t byte_size, int32_t byte_offset,
2714f1b3e8SDimitry Andric uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset,
2814f1b3e8SDimitry Andric bool is_base_class, bool is_deref_of_parent, lldb::addr_t live_address,
2914f1b3e8SDimitry Andric uint64_t language_flags)
3014f1b3e8SDimitry Andric : ValueObjectChild(parent, compiler_type, name, byte_size, byte_offset,
3114f1b3e8SDimitry Andric bitfield_bit_size, bitfield_bit_offset, is_base_class,
3214f1b3e8SDimitry Andric is_deref_of_parent, eAddressTypeLoad, language_flags),
3314f1b3e8SDimitry Andric m_impl(this, live_address) {
34f034231aSEd Maste m_name = name;
35f034231aSEd Maste }
36f034231aSEd Maste
37344a3780SDimitry Andric ValueObjectConstResultChild::~ValueObjectConstResultChild() = default;
38f034231aSEd Maste
Dereference(Status & error)39b76161e4SDimitry Andric lldb::ValueObjectSP ValueObjectConstResultChild::Dereference(Status &error) {
40f034231aSEd Maste return m_impl.Dereference(error);
41f034231aSEd Maste }
42f034231aSEd Maste
GetSyntheticChildAtOffset(uint32_t offset,const CompilerType & type,bool can_create,ConstString name_const_str)4314f1b3e8SDimitry Andric lldb::ValueObjectSP ValueObjectConstResultChild::GetSyntheticChildAtOffset(
4414f1b3e8SDimitry Andric uint32_t offset, const CompilerType &type, bool can_create,
4514f1b3e8SDimitry Andric ConstString name_const_str) {
4614f1b3e8SDimitry Andric return m_impl.GetSyntheticChildAtOffset(offset, type, can_create,
47f3fbd1c0SDimitry Andric name_const_str);
48f034231aSEd Maste }
49f034231aSEd Maste
AddressOf(Status & error)50b76161e4SDimitry Andric lldb::ValueObjectSP ValueObjectConstResultChild::AddressOf(Status &error) {
51f034231aSEd Maste return m_impl.AddressOf(error);
52f034231aSEd Maste }
53f034231aSEd Maste
GetAddressOf(bool scalar_is_load_address,AddressType * address_type)5494994d37SDimitry Andric lldb::addr_t ValueObjectConstResultChild::GetAddressOf(
5594994d37SDimitry Andric bool scalar_is_load_address, AddressType* address_type) {
5694994d37SDimitry Andric return m_impl.GetAddressOf(scalar_is_load_address, address_type);
5794994d37SDimitry Andric }
5894994d37SDimitry Andric
GetPointeeData(DataExtractor & data,uint32_t item_idx,uint32_t item_count)5914f1b3e8SDimitry Andric size_t ValueObjectConstResultChild::GetPointeeData(DataExtractor &data,
60f034231aSEd Maste uint32_t item_idx,
6114f1b3e8SDimitry Andric uint32_t item_count) {
62f034231aSEd Maste return m_impl.GetPointeeData(data, item_idx, item_count);
63f034231aSEd Maste }
64e81d9d49SDimitry Andric
65e81d9d49SDimitry Andric lldb::ValueObjectSP
DoCast(const CompilerType & compiler_type)667fa27ce4SDimitry Andric ValueObjectConstResultChild::DoCast(const CompilerType &compiler_type) {
67e81d9d49SDimitry Andric return m_impl.Cast(compiler_type);
68e81d9d49SDimitry Andric }
69