1 //===-- ValueObjectConstResultChild.cpp ------------------------------*- C++ -*-===//
2 //
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 
12 #include "lldb/Core/ValueObjectConstResult.h"
13 #include "lldb/Core/ValueObjectList.h"
14 
15 #include "lldb/Symbol/ClangASTContext.h"
16 
17 using namespace lldb_private;
18 
19 ValueObjectConstResultChild::ValueObjectConstResultChild
20 (
21     ValueObject &parent,
22     const CompilerType &compiler_type,
23     const ConstString &name,
24     uint32_t byte_size,
25     int32_t byte_offset,
26     uint32_t bitfield_bit_size,
27     uint32_t bitfield_bit_offset,
28     bool is_base_class,
29     bool is_deref_of_parent,
30     lldb::addr_t live_address,
31     uint64_t language_flags
32 ) :
33     ValueObjectChild (parent,
34                       compiler_type,
35                       name,
36                       byte_size,
37                       byte_offset,
38                       bitfield_bit_size,
39                       bitfield_bit_offset,
40                       is_base_class,
41                       is_deref_of_parent,
42                       eAddressTypeLoad,
43                       language_flags),
44     m_impl(this, live_address)
45 {
46     m_name = name;
47 }
48 
49 ValueObjectConstResultChild::~ValueObjectConstResultChild()
50 {
51 }
52 
53 lldb::ValueObjectSP
54 ValueObjectConstResultChild::Dereference (Error &error)
55 {
56     return m_impl.Dereference(error);
57 }
58 
59 lldb::ValueObjectSP
60 ValueObjectConstResultChild::GetSyntheticChildAtOffset(uint32_t offset, const CompilerType& type, bool can_create)
61 {
62     return m_impl.GetSyntheticChildAtOffset(offset, type, can_create);
63 }
64 
65 lldb::ValueObjectSP
66 ValueObjectConstResultChild::AddressOf (Error &error)
67 {
68     return m_impl.AddressOf(error);
69 }
70 
71 ValueObject *
72 ValueObjectConstResultChild::CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index)
73 {
74     return m_impl.CreateChildAtIndex(idx, synthetic_array_member, synthetic_index);
75 }
76 
77 size_t
78 ValueObjectConstResultChild::GetPointeeData (DataExtractor& data,
79                                              uint32_t item_idx,
80                                              uint32_t item_count)
81 {
82     return m_impl.GetPointeeData(data, item_idx, item_count);
83 }
84 
85 lldb::ValueObjectSP
86 ValueObjectConstResultChild::Cast (const CompilerType &compiler_type)
87 {
88     return m_impl.Cast(compiler_type);
89 }
90