Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 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, |
Greg Clayton | 57ee306 | 2013-07-11 22:46:58 +0000 | [diff] [blame] | 22 | const ClangASTType &clang_type, |
Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 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, |
Siva Chandra | f8877ef | 2015-07-16 01:47:12 +0000 | [diff] [blame^] | 29 | bool is_deref_of_parent, |
| 30 | lldb::addr_t live_address |
Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 31 | ) : |
| 32 | ValueObjectChild (parent, |
Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 33 | clang_type, |
| 34 | name, |
| 35 | byte_size, |
| 36 | byte_offset, |
| 37 | bitfield_bit_size, |
| 38 | bitfield_bit_offset, |
| 39 | is_base_class, |
| 40 | is_deref_of_parent, |
| 41 | eAddressTypeLoad), |
Siva Chandra | f8877ef | 2015-07-16 01:47:12 +0000 | [diff] [blame^] | 42 | m_impl(this, live_address) |
Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 43 | { |
| 44 | m_name = name; |
| 45 | } |
| 46 | |
| 47 | ValueObjectConstResultChild::~ValueObjectConstResultChild() |
| 48 | { |
| 49 | } |
| 50 | |
| 51 | lldb::ValueObjectSP |
| 52 | ValueObjectConstResultChild::Dereference (Error &error) |
| 53 | { |
| 54 | return m_impl.Dereference(error); |
| 55 | } |
| 56 | |
| 57 | lldb::ValueObjectSP |
| 58 | ValueObjectConstResultChild::GetSyntheticChildAtOffset(uint32_t offset, const ClangASTType& type, bool can_create) |
| 59 | { |
| 60 | return m_impl.GetSyntheticChildAtOffset(offset, type, can_create); |
| 61 | } |
| 62 | |
| 63 | lldb::ValueObjectSP |
| 64 | ValueObjectConstResultChild::AddressOf (Error &error) |
| 65 | { |
| 66 | return m_impl.AddressOf(error); |
| 67 | } |
| 68 | |
| 69 | ValueObject * |
Greg Clayton | c7bece56 | 2013-01-25 18:06:21 +0000 | [diff] [blame] | 70 | ValueObjectConstResultChild::CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index) |
Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 71 | { |
| 72 | return m_impl.CreateChildAtIndex(idx, synthetic_array_member, synthetic_index); |
| 73 | } |
| 74 | |
| 75 | size_t |
| 76 | ValueObjectConstResultChild::GetPointeeData (DataExtractor& data, |
| 77 | uint32_t item_idx, |
| 78 | uint32_t item_count) |
| 79 | { |
| 80 | return m_impl.GetPointeeData(data, item_idx, item_count); |
| 81 | } |
Siva Chandra | f8877ef | 2015-07-16 01:47:12 +0000 | [diff] [blame^] | 82 | |
| 83 | lldb::ValueObjectSP |
| 84 | ValueObjectConstResultChild::Cast (const ClangASTType &clang_ast_type) |
| 85 | { |
| 86 | return m_impl.Cast(clang_ast_type); |
| 87 | } |