19f2f44ceSEd Maste //===-- ValueObjectConstResultCast.cpp --------------------------*- C++ -*-===//
29f2f44ceSEd Maste //
39f2f44ceSEd Maste //                     The LLVM Compiler Infrastructure
49f2f44ceSEd Maste //
59f2f44ceSEd Maste // This file is distributed under the University of Illinois Open Source
69f2f44ceSEd Maste // License. See LICENSE.TXT for details.
79f2f44ceSEd Maste //
89f2f44ceSEd Maste //===----------------------------------------------------------------------===//
99f2f44ceSEd Maste 
109f2f44ceSEd Maste #include "lldb/Core/ValueObjectConstResultCast.h"
119f2f44ceSEd Maste 
12f678e45dSDimitry Andric namespace lldb_private {
13f678e45dSDimitry Andric class DataExtractor;
14f678e45dSDimitry Andric }
15f678e45dSDimitry Andric namespace lldb_private {
16*5517e702SDimitry Andric class Status;
17f678e45dSDimitry Andric }
18f678e45dSDimitry Andric namespace lldb_private {
19f678e45dSDimitry Andric class ValueObject;
20f678e45dSDimitry Andric }
219f2f44ceSEd Maste 
229f2f44ceSEd Maste using namespace lldb_private;
239f2f44ceSEd Maste 
ValueObjectConstResultCast(ValueObject & parent,const ConstString & name,const CompilerType & cast_type,lldb::addr_t live_address)249f2f44ceSEd Maste ValueObjectConstResultCast::ValueObjectConstResultCast(
25435933ddSDimitry Andric     ValueObject &parent, const ConstString &name, const CompilerType &cast_type,
26435933ddSDimitry Andric     lldb::addr_t live_address)
27435933ddSDimitry Andric     : ValueObjectCast(parent, name, cast_type), m_impl(this, live_address) {
289f2f44ceSEd Maste   m_name = name;
299f2f44ceSEd Maste }
309f2f44ceSEd Maste 
~ValueObjectConstResultCast()31435933ddSDimitry Andric ValueObjectConstResultCast::~ValueObjectConstResultCast() {}
329f2f44ceSEd Maste 
Dereference(Status & error)33*5517e702SDimitry Andric lldb::ValueObjectSP ValueObjectConstResultCast::Dereference(Status &error) {
349f2f44ceSEd Maste   return m_impl.Dereference(error);
359f2f44ceSEd Maste }
369f2f44ceSEd Maste 
GetSyntheticChildAtOffset(uint32_t offset,const CompilerType & type,bool can_create,ConstString name_const_str)37435933ddSDimitry Andric lldb::ValueObjectSP ValueObjectConstResultCast::GetSyntheticChildAtOffset(
38435933ddSDimitry Andric     uint32_t offset, const CompilerType &type, bool can_create,
39435933ddSDimitry Andric     ConstString name_const_str) {
40435933ddSDimitry Andric   return m_impl.GetSyntheticChildAtOffset(offset, type, can_create,
41435933ddSDimitry Andric                                           name_const_str);
429f2f44ceSEd Maste }
439f2f44ceSEd Maste 
AddressOf(Status & error)44*5517e702SDimitry Andric lldb::ValueObjectSP ValueObjectConstResultCast::AddressOf(Status &error) {
459f2f44ceSEd Maste   return m_impl.AddressOf(error);
469f2f44ceSEd Maste }
479f2f44ceSEd Maste 
CreateChildAtIndex(size_t idx,bool synthetic_array_member,int32_t synthetic_index)48435933ddSDimitry Andric ValueObject *ValueObjectConstResultCast::CreateChildAtIndex(
49435933ddSDimitry Andric     size_t idx, bool synthetic_array_member, int32_t synthetic_index) {
50435933ddSDimitry Andric   return m_impl.CreateChildAtIndex(idx, synthetic_array_member,
51435933ddSDimitry Andric                                    synthetic_index);
529f2f44ceSEd Maste }
539f2f44ceSEd Maste 
GetPointeeData(DataExtractor & data,uint32_t item_idx,uint32_t item_count)54435933ddSDimitry Andric size_t ValueObjectConstResultCast::GetPointeeData(DataExtractor &data,
559f2f44ceSEd Maste                                                   uint32_t item_idx,
56435933ddSDimitry Andric                                                   uint32_t item_count) {
579f2f44ceSEd Maste   return m_impl.GetPointeeData(data, item_idx, item_count);
589f2f44ceSEd Maste }
599f2f44ceSEd Maste 
609f2f44ceSEd Maste lldb::ValueObjectSP
Cast(const CompilerType & compiler_type)61435933ddSDimitry Andric ValueObjectConstResultCast::Cast(const CompilerType &compiler_type) {
629f2f44ceSEd Maste   return m_impl.Cast(compiler_type);
639f2f44ceSEd Maste }
64