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