Raphael Isemann | 8081428 | 2020-01-24 08:23:27 +0100 | [diff] [blame] | 1 | //===-- ValueObjectConstResultChild.cpp -----------------------------------===// |
Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 2 | // |
Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #include "lldb/Core/ValueObjectConstResultChild.h" |
| 10 | |
Jonas Devlieghere | 672d2c1 | 2018-11-11 23:16:43 +0000 | [diff] [blame] | 11 | #include "lldb/lldb-private-enumerations.h" |
Zachary Turner | 2f3df61 | 2017-04-06 21:28:29 +0000 | [diff] [blame] | 12 | namespace lldb_private { |
| 13 | class DataExtractor; |
| 14 | } |
| 15 | namespace lldb_private { |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 16 | class Status; |
Zachary Turner | 2f3df61 | 2017-04-06 21:28:29 +0000 | [diff] [blame] | 17 | } |
| 18 | namespace lldb_private { |
| 19 | class ValueObject; |
| 20 | } |
Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 21 | |
| 22 | using namespace lldb_private; |
| 23 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 24 | ValueObjectConstResultChild::ValueObjectConstResultChild( |
| 25 | ValueObject &parent, const CompilerType &compiler_type, |
Adrian Prantl | 0e4c482 | 2019-03-06 21:22:25 +0000 | [diff] [blame] | 26 | ConstString name, uint32_t byte_size, int32_t byte_offset, |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 27 | uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset, |
| 28 | bool is_base_class, bool is_deref_of_parent, lldb::addr_t live_address, |
| 29 | uint64_t language_flags) |
| 30 | : ValueObjectChild(parent, compiler_type, name, byte_size, byte_offset, |
| 31 | bitfield_bit_size, bitfield_bit_offset, is_base_class, |
| 32 | is_deref_of_parent, eAddressTypeLoad, language_flags), |
| 33 | m_impl(this, live_address) { |
| 34 | m_name = name; |
Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 35 | } |
| 36 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 37 | ValueObjectConstResultChild::~ValueObjectConstResultChild() {} |
| 38 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 39 | lldb::ValueObjectSP ValueObjectConstResultChild::Dereference(Status &error) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 40 | return m_impl.Dereference(error); |
| 41 | } |
| 42 | |
| 43 | lldb::ValueObjectSP ValueObjectConstResultChild::GetSyntheticChildAtOffset( |
| 44 | uint32_t offset, const CompilerType &type, bool can_create, |
| 45 | ConstString name_const_str) { |
| 46 | return m_impl.GetSyntheticChildAtOffset(offset, type, can_create, |
| 47 | name_const_str); |
| 48 | } |
| 49 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 50 | lldb::ValueObjectSP ValueObjectConstResultChild::AddressOf(Status &error) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 51 | return m_impl.AddressOf(error); |
| 52 | } |
| 53 | |
Aleksandr Urakov | b4c1e4c | 2019-01-14 13:08:13 +0000 | [diff] [blame] | 54 | lldb::addr_t ValueObjectConstResultChild::GetAddressOf( |
| 55 | bool scalar_is_load_address, AddressType* address_type) { |
| 56 | return m_impl.GetAddressOf(scalar_is_load_address, address_type); |
| 57 | } |
| 58 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 59 | ValueObject *ValueObjectConstResultChild::CreateChildAtIndex( |
| 60 | size_t idx, bool synthetic_array_member, int32_t synthetic_index) { |
| 61 | return m_impl.CreateChildAtIndex(idx, synthetic_array_member, |
| 62 | synthetic_index); |
| 63 | } |
| 64 | |
| 65 | size_t ValueObjectConstResultChild::GetPointeeData(DataExtractor &data, |
| 66 | uint32_t item_idx, |
| 67 | uint32_t item_count) { |
| 68 | return m_impl.GetPointeeData(data, item_idx, item_count); |
Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 69 | } |
| 70 | |
| 71 | lldb::ValueObjectSP |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 72 | ValueObjectConstResultChild::Cast(const CompilerType &compiler_type) { |
| 73 | return m_impl.Cast(compiler_type); |
Siva Chandra | f8877ef | 2015-07-16 01:47:12 +0000 | [diff] [blame] | 74 | } |