15ffd83dbSDimitry Andric //===-- ValueObjectConstResultCast.cpp ------------------------------------===//
20b57cec5SDimitry Andric //
30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric //
70b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric
90b57cec5SDimitry Andric #include "lldb/Core/ValueObjectConstResultCast.h"
100b57cec5SDimitry Andric
110b57cec5SDimitry Andric namespace lldb_private {
120b57cec5SDimitry Andric class DataExtractor;
130b57cec5SDimitry Andric }
140b57cec5SDimitry Andric namespace lldb_private {
150b57cec5SDimitry Andric class Status;
160b57cec5SDimitry Andric }
170b57cec5SDimitry Andric namespace lldb_private {
180b57cec5SDimitry Andric class ValueObject;
190b57cec5SDimitry Andric }
200b57cec5SDimitry Andric
210b57cec5SDimitry Andric using namespace lldb_private;
220b57cec5SDimitry Andric
ValueObjectConstResultCast(ValueObject & parent,ConstString name,const CompilerType & cast_type,lldb::addr_t live_address)230b57cec5SDimitry Andric ValueObjectConstResultCast::ValueObjectConstResultCast(
240b57cec5SDimitry Andric ValueObject &parent, ConstString name, const CompilerType &cast_type,
250b57cec5SDimitry Andric lldb::addr_t live_address)
260b57cec5SDimitry Andric : ValueObjectCast(parent, name, cast_type), m_impl(this, live_address) {
270b57cec5SDimitry Andric m_name = name;
280b57cec5SDimitry Andric }
290b57cec5SDimitry Andric
30fe6060f1SDimitry Andric ValueObjectConstResultCast::~ValueObjectConstResultCast() = default;
310b57cec5SDimitry Andric
Dereference(Status & error)320b57cec5SDimitry Andric lldb::ValueObjectSP ValueObjectConstResultCast::Dereference(Status &error) {
330b57cec5SDimitry Andric return m_impl.Dereference(error);
340b57cec5SDimitry Andric }
350b57cec5SDimitry Andric
GetSyntheticChildAtOffset(uint32_t offset,const CompilerType & type,bool can_create,ConstString name_const_str)360b57cec5SDimitry Andric lldb::ValueObjectSP ValueObjectConstResultCast::GetSyntheticChildAtOffset(
370b57cec5SDimitry Andric uint32_t offset, const CompilerType &type, bool can_create,
380b57cec5SDimitry Andric ConstString name_const_str) {
390b57cec5SDimitry Andric return m_impl.GetSyntheticChildAtOffset(offset, type, can_create,
400b57cec5SDimitry Andric name_const_str);
410b57cec5SDimitry Andric }
420b57cec5SDimitry Andric
AddressOf(Status & error)430b57cec5SDimitry Andric lldb::ValueObjectSP ValueObjectConstResultCast::AddressOf(Status &error) {
440b57cec5SDimitry Andric return m_impl.AddressOf(error);
450b57cec5SDimitry Andric }
460b57cec5SDimitry Andric
CreateChildAtIndex(size_t idx,bool synthetic_array_member,int32_t synthetic_index)470b57cec5SDimitry Andric ValueObject *ValueObjectConstResultCast::CreateChildAtIndex(
480b57cec5SDimitry Andric size_t idx, bool synthetic_array_member, int32_t synthetic_index) {
490b57cec5SDimitry Andric return m_impl.CreateChildAtIndex(idx, synthetic_array_member,
500b57cec5SDimitry Andric synthetic_index);
510b57cec5SDimitry Andric }
520b57cec5SDimitry Andric
GetPointeeData(DataExtractor & data,uint32_t item_idx,uint32_t item_count)530b57cec5SDimitry Andric size_t ValueObjectConstResultCast::GetPointeeData(DataExtractor &data,
540b57cec5SDimitry Andric uint32_t item_idx,
550b57cec5SDimitry Andric uint32_t item_count) {
560b57cec5SDimitry Andric return m_impl.GetPointeeData(data, item_idx, item_count);
570b57cec5SDimitry Andric }
580b57cec5SDimitry Andric
590b57cec5SDimitry Andric lldb::ValueObjectSP
DoCast(const CompilerType & compiler_type)60*fe013be4SDimitry Andric ValueObjectConstResultCast::DoCast(const CompilerType &compiler_type) {
610b57cec5SDimitry Andric return m_impl.Cast(compiler_type);
620b57cec5SDimitry Andric }
63