blob: 2a305a1bea51bd9c9700712b1d60cea0572ff7b6 [file] [log] [blame]
Enrico Granata9128ee22011-09-06 19:20:51 +00001//===-- 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
17using namespace lldb_private;
18
19ValueObjectConstResultChild::ValueObjectConstResultChild
20(
21 ValueObject &parent,
22 clang::ASTContext *clang_ast,
23 void *clang_type,
24 const ConstString &name,
25 uint32_t byte_size,
26 int32_t byte_offset,
27 uint32_t bitfield_bit_size,
28 uint32_t bitfield_bit_offset,
29 bool is_base_class,
30 bool is_deref_of_parent
31) :
32 ValueObjectChild (parent,
33 clang_ast,
34 clang_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 m_impl(this)
44{
45 m_name = name;
46}
47
48ValueObjectConstResultChild::~ValueObjectConstResultChild()
49{
50}
51
52lldb::ValueObjectSP
53ValueObjectConstResultChild::Dereference (Error &error)
54{
55 return m_impl.Dereference(error);
56}
57
58lldb::ValueObjectSP
59ValueObjectConstResultChild::GetSyntheticChildAtOffset(uint32_t offset, const ClangASTType& type, bool can_create)
60{
61 return m_impl.GetSyntheticChildAtOffset(offset, type, can_create);
62}
63
64lldb::ValueObjectSP
65ValueObjectConstResultChild::AddressOf (Error &error)
66{
67 return m_impl.AddressOf(error);
68}
69
70ValueObject *
71ValueObjectConstResultChild::CreateChildAtIndex (uint32_t idx, bool synthetic_array_member, int32_t synthetic_index)
72{
73 return m_impl.CreateChildAtIndex(idx, synthetic_array_member, synthetic_index);
74}
75
76size_t
77ValueObjectConstResultChild::GetPointeeData (DataExtractor& data,
78 uint32_t item_idx,
79 uint32_t item_count)
80{
81 return m_impl.GetPointeeData(data, item_idx, item_count);
82}