Siva Chandra | f8877ef | 2015-07-16 01:47:12 +0000 | [diff] [blame] | 1 | //===-- ValueObjectConstResultCast.cpp --------------------------*- C++ -*-===// |
| 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 |
Siva Chandra | f8877ef | 2015-07-16 01:47:12 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #include "lldb/Core/ValueObjectConstResultCast.h" |
| 10 | |
Zachary Turner | 2f3df61 | 2017-04-06 21:28:29 +0000 | [diff] [blame] | 11 | namespace lldb_private { |
| 12 | class DataExtractor; |
| 13 | } |
| 14 | namespace lldb_private { |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 15 | class Status; |
Zachary Turner | 2f3df61 | 2017-04-06 21:28:29 +0000 | [diff] [blame] | 16 | } |
| 17 | namespace lldb_private { |
| 18 | class ValueObject; |
| 19 | } |
Siva Chandra | f8877ef | 2015-07-16 01:47:12 +0000 | [diff] [blame] | 20 | |
| 21 | using namespace lldb_private; |
| 22 | |
| 23 | ValueObjectConstResultCast::ValueObjectConstResultCast( |
Adrian Prantl | 0e4c482 | 2019-03-06 21:22:25 +0000 | [diff] [blame] | 24 | ValueObject &parent, ConstString name, const CompilerType &cast_type, |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 25 | lldb::addr_t live_address) |
| 26 | : ValueObjectCast(parent, name, cast_type), m_impl(this, live_address) { |
| 27 | m_name = name; |
Siva Chandra | f8877ef | 2015-07-16 01:47:12 +0000 | [diff] [blame] | 28 | } |
| 29 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 30 | ValueObjectConstResultCast::~ValueObjectConstResultCast() {} |
| 31 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 32 | lldb::ValueObjectSP ValueObjectConstResultCast::Dereference(Status &error) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 33 | return m_impl.Dereference(error); |
| 34 | } |
| 35 | |
| 36 | lldb::ValueObjectSP ValueObjectConstResultCast::GetSyntheticChildAtOffset( |
| 37 | uint32_t offset, const CompilerType &type, bool can_create, |
| 38 | ConstString name_const_str) { |
| 39 | return m_impl.GetSyntheticChildAtOffset(offset, type, can_create, |
| 40 | name_const_str); |
| 41 | } |
| 42 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 43 | lldb::ValueObjectSP ValueObjectConstResultCast::AddressOf(Status &error) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 44 | return m_impl.AddressOf(error); |
| 45 | } |
| 46 | |
| 47 | ValueObject *ValueObjectConstResultCast::CreateChildAtIndex( |
| 48 | size_t idx, bool synthetic_array_member, int32_t synthetic_index) { |
| 49 | return m_impl.CreateChildAtIndex(idx, synthetic_array_member, |
| 50 | synthetic_index); |
| 51 | } |
| 52 | |
| 53 | size_t ValueObjectConstResultCast::GetPointeeData(DataExtractor &data, |
| 54 | uint32_t item_idx, |
| 55 | uint32_t item_count) { |
| 56 | return m_impl.GetPointeeData(data, item_idx, item_count); |
Siva Chandra | f8877ef | 2015-07-16 01:47:12 +0000 | [diff] [blame] | 57 | } |
| 58 | |
| 59 | lldb::ValueObjectSP |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 60 | ValueObjectConstResultCast::Cast(const CompilerType &compiler_type) { |
| 61 | return m_impl.Cast(compiler_type); |
Siva Chandra | f8877ef | 2015-07-16 01:47:12 +0000 | [diff] [blame] | 62 | } |