blob: 3e9f876841620d6060cbf13294de19e95dbbac99 [file] [log] [blame]
Zachary Turner2f3df612017-04-06 21:28:29 +00001//===-- ValueObjectConstResultChild.cpp --------------------------*- C++-*-===//
Enrico Granata9128ee22011-09-06 19:20:51 +00002//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#include "lldb/Core/ValueObjectConstResultChild.h"
11
Zachary Turner2f3df612017-04-06 21:28:29 +000012#include "lldb/lldb-private-enumerations.h" // for AddressType::eAddressType
13namespace lldb_private {
14class DataExtractor;
15}
16namespace lldb_private {
Zachary Turner97206d52017-05-12 04:51:55 +000017class Status;
Zachary Turner2f3df612017-04-06 21:28:29 +000018}
19namespace lldb_private {
20class ValueObject;
21}
Enrico Granata9128ee22011-09-06 19:20:51 +000022
23using namespace lldb_private;
24
Kate Stoneb9c1b512016-09-06 20:57:50 +000025ValueObjectConstResultChild::ValueObjectConstResultChild(
26 ValueObject &parent, const CompilerType &compiler_type,
27 const ConstString &name, uint32_t byte_size, int32_t byte_offset,
28 uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset,
29 bool is_base_class, bool is_deref_of_parent, lldb::addr_t live_address,
30 uint64_t language_flags)
31 : ValueObjectChild(parent, compiler_type, name, byte_size, byte_offset,
32 bitfield_bit_size, bitfield_bit_offset, is_base_class,
33 is_deref_of_parent, eAddressTypeLoad, language_flags),
34 m_impl(this, live_address) {
35 m_name = name;
Enrico Granata9128ee22011-09-06 19:20:51 +000036}
37
Kate Stoneb9c1b512016-09-06 20:57:50 +000038ValueObjectConstResultChild::~ValueObjectConstResultChild() {}
39
Zachary Turner97206d52017-05-12 04:51:55 +000040lldb::ValueObjectSP ValueObjectConstResultChild::Dereference(Status &error) {
Kate Stoneb9c1b512016-09-06 20:57:50 +000041 return m_impl.Dereference(error);
42}
43
44lldb::ValueObjectSP ValueObjectConstResultChild::GetSyntheticChildAtOffset(
45 uint32_t offset, const CompilerType &type, bool can_create,
46 ConstString name_const_str) {
47 return m_impl.GetSyntheticChildAtOffset(offset, type, can_create,
48 name_const_str);
49}
50
Zachary Turner97206d52017-05-12 04:51:55 +000051lldb::ValueObjectSP ValueObjectConstResultChild::AddressOf(Status &error) {
Kate Stoneb9c1b512016-09-06 20:57:50 +000052 return m_impl.AddressOf(error);
53}
54
55ValueObject *ValueObjectConstResultChild::CreateChildAtIndex(
56 size_t idx, bool synthetic_array_member, int32_t synthetic_index) {
57 return m_impl.CreateChildAtIndex(idx, synthetic_array_member,
58 synthetic_index);
59}
60
61size_t ValueObjectConstResultChild::GetPointeeData(DataExtractor &data,
62 uint32_t item_idx,
63 uint32_t item_count) {
64 return m_impl.GetPointeeData(data, item_idx, item_count);
Enrico Granata9128ee22011-09-06 19:20:51 +000065}
66
67lldb::ValueObjectSP
Kate Stoneb9c1b512016-09-06 20:57:50 +000068ValueObjectConstResultChild::Cast(const CompilerType &compiler_type) {
69 return m_impl.Cast(compiler_type);
Siva Chandraf8877ef2015-07-16 01:47:12 +000070}