• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
ValueObjectConstResultChild(ValueObject & parent,const ClangASTType & clang_type,const 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)19 ValueObjectConstResultChild::ValueObjectConstResultChild
20 (
21     ValueObject &parent,
22     const ClangASTType &clang_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 ) :
31     ValueObjectChild (parent,
32                       clang_type,
33                       name,
34                       byte_size,
35                       byte_offset,
36                       bitfield_bit_size,
37                       bitfield_bit_offset,
38                       is_base_class,
39                       is_deref_of_parent,
40                       eAddressTypeLoad),
41     m_impl(this)
42 {
43     m_name = name;
44 }
45 
~ValueObjectConstResultChild()46 ValueObjectConstResultChild::~ValueObjectConstResultChild()
47 {
48 }
49 
50 lldb::ValueObjectSP
Dereference(Error & error)51 ValueObjectConstResultChild::Dereference (Error &error)
52 {
53     return m_impl.Dereference(error);
54 }
55 
56 lldb::ValueObjectSP
GetSyntheticChildAtOffset(uint32_t offset,const ClangASTType & type,bool can_create)57 ValueObjectConstResultChild::GetSyntheticChildAtOffset(uint32_t offset, const ClangASTType& type, bool can_create)
58 {
59     return m_impl.GetSyntheticChildAtOffset(offset, type, can_create);
60 }
61 
62 lldb::ValueObjectSP
AddressOf(Error & error)63 ValueObjectConstResultChild::AddressOf (Error &error)
64 {
65     return m_impl.AddressOf(error);
66 }
67 
68 ValueObject *
CreateChildAtIndex(size_t idx,bool synthetic_array_member,int32_t synthetic_index)69 ValueObjectConstResultChild::CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index)
70 {
71     return m_impl.CreateChildAtIndex(idx, synthetic_array_member, synthetic_index);
72 }
73 
74 size_t
GetPointeeData(DataExtractor & data,uint32_t item_idx,uint32_t item_count)75 ValueObjectConstResultChild::GetPointeeData (DataExtractor& data,
76                                              uint32_t item_idx,
77                                              uint32_t item_count)
78 {
79     return m_impl.GetPointeeData(data, item_idx, item_count);
80 }
81