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 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 320b57cec5SDimitry Andric lldb::ValueObjectSP ValueObjectConstResultCast::Dereference(Status &error) { 330b57cec5SDimitry Andric return m_impl.Dereference(error); 340b57cec5SDimitry Andric } 350b57cec5SDimitry Andric 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 430b57cec5SDimitry Andric lldb::ValueObjectSP ValueObjectConstResultCast::AddressOf(Status &error) { 440b57cec5SDimitry Andric return m_impl.AddressOf(error); 450b57cec5SDimitry Andric } 460b57cec5SDimitry Andric 470b57cec5SDimitry Andric size_t ValueObjectConstResultCast::GetPointeeData(DataExtractor &data, 480b57cec5SDimitry Andric uint32_t item_idx, 490b57cec5SDimitry Andric uint32_t item_count) { 500b57cec5SDimitry Andric return m_impl.GetPointeeData(data, item_idx, item_count); 510b57cec5SDimitry Andric } 520b57cec5SDimitry Andric 530b57cec5SDimitry Andric lldb::ValueObjectSP 54*06c3fb27SDimitry Andric ValueObjectConstResultCast::DoCast(const CompilerType &compiler_type) { 550b57cec5SDimitry Andric return m_impl.Cast(compiler_type); 560b57cec5SDimitry Andric } 57