180814287SRaphael Isemann //===-- ValueObjectConstResultCast.cpp ------------------------------------===//
2f8877efcSSiva Chandra //
32946cd70SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
42946cd70SChandler Carruth // See https://llvm.org/LICENSE.txt for license information.
52946cd70SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6f8877efcSSiva Chandra //
7f8877efcSSiva Chandra //===----------------------------------------------------------------------===//
8f8877efcSSiva Chandra
9f8877efcSSiva Chandra #include "lldb/Core/ValueObjectConstResultCast.h"
10f8877efcSSiva Chandra
112f3df613SZachary Turner namespace lldb_private {
122f3df613SZachary Turner class DataExtractor;
132f3df613SZachary Turner }
142f3df613SZachary Turner namespace lldb_private {
1597206d57SZachary Turner class Status;
162f3df613SZachary Turner }
172f3df613SZachary Turner namespace lldb_private {
182f3df613SZachary Turner class ValueObject;
192f3df613SZachary Turner }
20f8877efcSSiva Chandra
21f8877efcSSiva Chandra using namespace lldb_private;
22f8877efcSSiva Chandra
ValueObjectConstResultCast(ValueObject & parent,ConstString name,const CompilerType & cast_type,lldb::addr_t live_address)23f8877efcSSiva Chandra ValueObjectConstResultCast::ValueObjectConstResultCast(
240e4c4821SAdrian Prantl ValueObject &parent, ConstString name, const CompilerType &cast_type,
25b9c1b51eSKate Stone lldb::addr_t live_address)
26b9c1b51eSKate Stone : ValueObjectCast(parent, name, cast_type), m_impl(this, live_address) {
27f8877efcSSiva Chandra m_name = name;
28f8877efcSSiva Chandra }
29f8877efcSSiva Chandra
30*fd2433e1SJonas Devlieghere ValueObjectConstResultCast::~ValueObjectConstResultCast() = default;
31f8877efcSSiva Chandra
Dereference(Status & error)3297206d57SZachary Turner lldb::ValueObjectSP ValueObjectConstResultCast::Dereference(Status &error) {
33f8877efcSSiva Chandra return m_impl.Dereference(error);
34f8877efcSSiva Chandra }
35f8877efcSSiva Chandra
GetSyntheticChildAtOffset(uint32_t offset,const CompilerType & type,bool can_create,ConstString name_const_str)36b9c1b51eSKate Stone lldb::ValueObjectSP ValueObjectConstResultCast::GetSyntheticChildAtOffset(
37b9c1b51eSKate Stone uint32_t offset, const CompilerType &type, bool can_create,
38b9c1b51eSKate Stone ConstString name_const_str) {
39b9c1b51eSKate Stone return m_impl.GetSyntheticChildAtOffset(offset, type, can_create,
40b9c1b51eSKate Stone name_const_str);
41f8877efcSSiva Chandra }
42f8877efcSSiva Chandra
AddressOf(Status & error)4397206d57SZachary Turner lldb::ValueObjectSP ValueObjectConstResultCast::AddressOf(Status &error) {
44f8877efcSSiva Chandra return m_impl.AddressOf(error);
45f8877efcSSiva Chandra }
46f8877efcSSiva Chandra
CreateChildAtIndex(size_t idx,bool synthetic_array_member,int32_t synthetic_index)47b9c1b51eSKate Stone ValueObject *ValueObjectConstResultCast::CreateChildAtIndex(
48b9c1b51eSKate Stone size_t idx, bool synthetic_array_member, int32_t synthetic_index) {
49b9c1b51eSKate Stone return m_impl.CreateChildAtIndex(idx, synthetic_array_member,
50b9c1b51eSKate Stone synthetic_index);
51f8877efcSSiva Chandra }
52f8877efcSSiva Chandra
GetPointeeData(DataExtractor & data,uint32_t item_idx,uint32_t item_count)53b9c1b51eSKate Stone size_t ValueObjectConstResultCast::GetPointeeData(DataExtractor &data,
54f8877efcSSiva Chandra uint32_t item_idx,
55b9c1b51eSKate Stone uint32_t item_count) {
56f8877efcSSiva Chandra return m_impl.GetPointeeData(data, item_idx, item_count);
57f8877efcSSiva Chandra }
58f8877efcSSiva Chandra
59f8877efcSSiva Chandra lldb::ValueObjectSP
Cast(const CompilerType & compiler_type)60b9c1b51eSKate Stone ValueObjectConstResultCast::Cast(const CompilerType &compiler_type) {
613ad353f3SBruce Mitchener return m_impl.Cast(compiler_type);
62f8877efcSSiva Chandra }
63