1cfca06d7SDimitry Andric //===-- ValueObjectConstResultCast.cpp ------------------------------------===//
2e81d9d49SDimitry Andric //
35f29bb8aSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
45f29bb8aSDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
55f29bb8aSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6e81d9d49SDimitry Andric //
7e81d9d49SDimitry Andric //===----------------------------------------------------------------------===//
8e81d9d49SDimitry Andric
9e81d9d49SDimitry Andric #include "lldb/Core/ValueObjectConstResultCast.h"
10e81d9d49SDimitry Andric
1174a628f7SDimitry Andric namespace lldb_private {
1274a628f7SDimitry Andric class DataExtractor;
1374a628f7SDimitry Andric }
1474a628f7SDimitry Andric namespace lldb_private {
15b76161e4SDimitry Andric class Status;
1674a628f7SDimitry Andric }
1774a628f7SDimitry Andric namespace lldb_private {
1874a628f7SDimitry Andric class ValueObject;
1974a628f7SDimitry Andric }
20e81d9d49SDimitry Andric
21e81d9d49SDimitry Andric using namespace lldb_private;
22e81d9d49SDimitry Andric
ValueObjectConstResultCast(ValueObject & parent,ConstString name,const CompilerType & cast_type,lldb::addr_t live_address)23e81d9d49SDimitry Andric ValueObjectConstResultCast::ValueObjectConstResultCast(
245f29bb8aSDimitry Andric ValueObject &parent, ConstString name, const CompilerType &cast_type,
2514f1b3e8SDimitry Andric lldb::addr_t live_address)
2614f1b3e8SDimitry Andric : ValueObjectCast(parent, name, cast_type), m_impl(this, live_address) {
27e81d9d49SDimitry Andric m_name = name;
28e81d9d49SDimitry Andric }
29e81d9d49SDimitry Andric
30344a3780SDimitry Andric ValueObjectConstResultCast::~ValueObjectConstResultCast() = default;
31e81d9d49SDimitry Andric
Dereference(Status & error)32b76161e4SDimitry Andric lldb::ValueObjectSP ValueObjectConstResultCast::Dereference(Status &error) {
33e81d9d49SDimitry Andric return m_impl.Dereference(error);
34e81d9d49SDimitry Andric }
35e81d9d49SDimitry Andric
GetSyntheticChildAtOffset(uint32_t offset,const CompilerType & type,bool can_create,ConstString name_const_str)3614f1b3e8SDimitry Andric lldb::ValueObjectSP ValueObjectConstResultCast::GetSyntheticChildAtOffset(
3714f1b3e8SDimitry Andric uint32_t offset, const CompilerType &type, bool can_create,
3814f1b3e8SDimitry Andric ConstString name_const_str) {
3914f1b3e8SDimitry Andric return m_impl.GetSyntheticChildAtOffset(offset, type, can_create,
4014f1b3e8SDimitry Andric name_const_str);
41e81d9d49SDimitry Andric }
42e81d9d49SDimitry Andric
AddressOf(Status & error)43b76161e4SDimitry Andric lldb::ValueObjectSP ValueObjectConstResultCast::AddressOf(Status &error) {
44e81d9d49SDimitry Andric return m_impl.AddressOf(error);
45e81d9d49SDimitry Andric }
46e81d9d49SDimitry Andric
GetPointeeData(DataExtractor & data,uint32_t item_idx,uint32_t item_count)4714f1b3e8SDimitry Andric size_t ValueObjectConstResultCast::GetPointeeData(DataExtractor &data,
48e81d9d49SDimitry Andric uint32_t item_idx,
4914f1b3e8SDimitry Andric uint32_t item_count) {
50e81d9d49SDimitry Andric return m_impl.GetPointeeData(data, item_idx, item_count);
51e81d9d49SDimitry Andric }
52e81d9d49SDimitry Andric
53e81d9d49SDimitry Andric lldb::ValueObjectSP
DoCast(const CompilerType & compiler_type)547fa27ce4SDimitry Andric ValueObjectConstResultCast::DoCast(const CompilerType &compiler_type) {
55e81d9d49SDimitry Andric return m_impl.Cast(compiler_type);
56e81d9d49SDimitry Andric }
57