blob: 13c8393d8081d4cc840e1f07d23dd6bafbb9e52c [file] [log] [blame]
Raphael Isemann80814282020-01-24 08:23:27 +01001//===-- ValueObjectConstResultChild.cpp -----------------------------------===//
Enrico Granata9128ee22011-09-06 19:20:51 +00002//
Chandler Carruth2946cd72019-01-19 08:50:56 +00003// 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
Enrico Granata9128ee22011-09-06 19:20:51 +00006//
7//===----------------------------------------------------------------------===//
8
9#include "lldb/Core/ValueObjectConstResultChild.h"
10
Jonas Devlieghere672d2c12018-11-11 23:16:43 +000011#include "lldb/lldb-private-enumerations.h"
Zachary Turner2f3df612017-04-06 21:28:29 +000012namespace lldb_private {
13class DataExtractor;
14}
15namespace lldb_private {
Zachary Turner97206d52017-05-12 04:51:55 +000016class Status;
Zachary Turner2f3df612017-04-06 21:28:29 +000017}
18namespace lldb_private {
19class ValueObject;
20}
Enrico Granata9128ee22011-09-06 19:20:51 +000021
22using namespace lldb_private;
23
Kate Stoneb9c1b512016-09-06 20:57:50 +000024ValueObjectConstResultChild::ValueObjectConstResultChild(
25 ValueObject &parent, const CompilerType &compiler_type,
Adrian Prantl0e4c4822019-03-06 21:22:25 +000026 ConstString name, uint32_t byte_size, int32_t byte_offset,
Kate Stoneb9c1b512016-09-06 20:57:50 +000027 uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset,
28 bool is_base_class, bool is_deref_of_parent, lldb::addr_t live_address,
29 uint64_t language_flags)
30 : ValueObjectChild(parent, compiler_type, name, byte_size, byte_offset,
31 bitfield_bit_size, bitfield_bit_offset, is_base_class,
32 is_deref_of_parent, eAddressTypeLoad, language_flags),
33 m_impl(this, live_address) {
34 m_name = name;
Enrico Granata9128ee22011-09-06 19:20:51 +000035}
36
Kate Stoneb9c1b512016-09-06 20:57:50 +000037ValueObjectConstResultChild::~ValueObjectConstResultChild() {}
38
Zachary Turner97206d52017-05-12 04:51:55 +000039lldb::ValueObjectSP ValueObjectConstResultChild::Dereference(Status &error) {
Kate Stoneb9c1b512016-09-06 20:57:50 +000040 return m_impl.Dereference(error);
41}
42
43lldb::ValueObjectSP ValueObjectConstResultChild::GetSyntheticChildAtOffset(
44 uint32_t offset, const CompilerType &type, bool can_create,
45 ConstString name_const_str) {
46 return m_impl.GetSyntheticChildAtOffset(offset, type, can_create,
47 name_const_str);
48}
49
Zachary Turner97206d52017-05-12 04:51:55 +000050lldb::ValueObjectSP ValueObjectConstResultChild::AddressOf(Status &error) {
Kate Stoneb9c1b512016-09-06 20:57:50 +000051 return m_impl.AddressOf(error);
52}
53
Aleksandr Urakovb4c1e4c2019-01-14 13:08:13 +000054lldb::addr_t ValueObjectConstResultChild::GetAddressOf(
55 bool scalar_is_load_address, AddressType* address_type) {
56 return m_impl.GetAddressOf(scalar_is_load_address, address_type);
57}
58
Kate Stoneb9c1b512016-09-06 20:57:50 +000059ValueObject *ValueObjectConstResultChild::CreateChildAtIndex(
60 size_t idx, bool synthetic_array_member, int32_t synthetic_index) {
61 return m_impl.CreateChildAtIndex(idx, synthetic_array_member,
62 synthetic_index);
63}
64
65size_t ValueObjectConstResultChild::GetPointeeData(DataExtractor &data,
66 uint32_t item_idx,
67 uint32_t item_count) {
68 return m_impl.GetPointeeData(data, item_idx, item_count);
Enrico Granata9128ee22011-09-06 19:20:51 +000069}
70
71lldb::ValueObjectSP
Kate Stoneb9c1b512016-09-06 20:57:50 +000072ValueObjectConstResultChild::Cast(const CompilerType &compiler_type) {
73 return m_impl.Cast(compiler_type);
Siva Chandraf8877ef2015-07-16 01:47:12 +000074}