Zachary Turner | 2f3df61 | 2017-04-06 21:28:29 +0000 | [diff] [blame] | 1 | //===-- ValueObjectConstResultChild.cpp --------------------------*- C++-*-===// |
Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 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 | |
Jonas Devlieghere | 672d2c1 | 2018-11-11 23:16:43 +0000 | [diff] [blame] | 12 | #include "lldb/lldb-private-enumerations.h" |
Zachary Turner | 2f3df61 | 2017-04-06 21:28:29 +0000 | [diff] [blame] | 13 | namespace lldb_private { |
| 14 | class DataExtractor; |
| 15 | } |
| 16 | namespace lldb_private { |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 17 | class Status; |
Zachary Turner | 2f3df61 | 2017-04-06 21:28:29 +0000 | [diff] [blame] | 18 | } |
| 19 | namespace lldb_private { |
| 20 | class ValueObject; |
| 21 | } |
Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 22 | |
| 23 | using namespace lldb_private; |
| 24 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 25 | ValueObjectConstResultChild::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 Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 36 | } |
| 37 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 38 | ValueObjectConstResultChild::~ValueObjectConstResultChild() {} |
| 39 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 40 | lldb::ValueObjectSP ValueObjectConstResultChild::Dereference(Status &error) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 41 | return m_impl.Dereference(error); |
| 42 | } |
| 43 | |
| 44 | lldb::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 Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 51 | lldb::ValueObjectSP ValueObjectConstResultChild::AddressOf(Status &error) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 52 | return m_impl.AddressOf(error); |
| 53 | } |
| 54 | |
Aleksandr Urakov | b4c1e4c | 2019-01-14 13:08:13 +0000 | [diff] [blame^] | 55 | lldb::addr_t ValueObjectConstResultChild::GetAddressOf( |
| 56 | bool scalar_is_load_address, AddressType* address_type) { |
| 57 | return m_impl.GetAddressOf(scalar_is_load_address, address_type); |
| 58 | } |
| 59 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 60 | ValueObject *ValueObjectConstResultChild::CreateChildAtIndex( |
| 61 | size_t idx, bool synthetic_array_member, int32_t synthetic_index) { |
| 62 | return m_impl.CreateChildAtIndex(idx, synthetic_array_member, |
| 63 | synthetic_index); |
| 64 | } |
| 65 | |
| 66 | size_t ValueObjectConstResultChild::GetPointeeData(DataExtractor &data, |
| 67 | uint32_t item_idx, |
| 68 | uint32_t item_count) { |
| 69 | return m_impl.GetPointeeData(data, item_idx, item_count); |
Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 70 | } |
| 71 | |
| 72 | lldb::ValueObjectSP |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 73 | ValueObjectConstResultChild::Cast(const CompilerType &compiler_type) { |
| 74 | return m_impl.Cast(compiler_type); |
Siva Chandra | f8877ef | 2015-07-16 01:47:12 +0000 | [diff] [blame] | 75 | } |