blob: b47e699e30f10d2febdcf843ac5f8b46e3a19339 [file] [log] [blame]
Siva Chandraf8877ef2015-07-16 01:47:12 +00001//===-- ValueObjectConstResultCast.cpp --------------------------*- C++ -*-===//
2//
Chandler Carruth2946cd72019-01-19 08:50:56 +00003// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Siva Chandraf8877ef2015-07-16 01:47:12 +00006//
7//===----------------------------------------------------------------------===//
8
9#include "lldb/Core/ValueObjectConstResultCast.h"
10
Zachary Turner2f3df612017-04-06 21:28:29 +000011namespace lldb_private {
12class DataExtractor;
13}
14namespace lldb_private {
Zachary Turner97206d52017-05-12 04:51:55 +000015class Status;
Zachary Turner2f3df612017-04-06 21:28:29 +000016}
17namespace lldb_private {
18class ValueObject;
19}
Siva Chandraf8877ef2015-07-16 01:47:12 +000020
21using namespace lldb_private;
22
23ValueObjectConstResultCast::ValueObjectConstResultCast(
Adrian Prantl0e4c4822019-03-06 21:22:25 +000024 ValueObject &parent, ConstString name, const CompilerType &cast_type,
Kate Stoneb9c1b512016-09-06 20:57:50 +000025 lldb::addr_t live_address)
26 : ValueObjectCast(parent, name, cast_type), m_impl(this, live_address) {
27 m_name = name;
Siva Chandraf8877ef2015-07-16 01:47:12 +000028}
29
Kate Stoneb9c1b512016-09-06 20:57:50 +000030ValueObjectConstResultCast::~ValueObjectConstResultCast() {}
31
Zachary Turner97206d52017-05-12 04:51:55 +000032lldb::ValueObjectSP ValueObjectConstResultCast::Dereference(Status &error) {
Kate Stoneb9c1b512016-09-06 20:57:50 +000033 return m_impl.Dereference(error);
34}
35
36lldb::ValueObjectSP ValueObjectConstResultCast::GetSyntheticChildAtOffset(
37 uint32_t offset, const CompilerType &type, bool can_create,
38 ConstString name_const_str) {
39 return m_impl.GetSyntheticChildAtOffset(offset, type, can_create,
40 name_const_str);
41}
42
Zachary Turner97206d52017-05-12 04:51:55 +000043lldb::ValueObjectSP ValueObjectConstResultCast::AddressOf(Status &error) {
Kate Stoneb9c1b512016-09-06 20:57:50 +000044 return m_impl.AddressOf(error);
45}
46
47ValueObject *ValueObjectConstResultCast::CreateChildAtIndex(
48 size_t idx, bool synthetic_array_member, int32_t synthetic_index) {
49 return m_impl.CreateChildAtIndex(idx, synthetic_array_member,
50 synthetic_index);
51}
52
53size_t ValueObjectConstResultCast::GetPointeeData(DataExtractor &data,
54 uint32_t item_idx,
55 uint32_t item_count) {
56 return m_impl.GetPointeeData(data, item_idx, item_count);
Siva Chandraf8877ef2015-07-16 01:47:12 +000057}
58
59lldb::ValueObjectSP
Kate Stoneb9c1b512016-09-06 20:57:50 +000060ValueObjectConstResultCast::Cast(const CompilerType &compiler_type) {
61 return m_impl.Cast(compiler_type);
Siva Chandraf8877ef2015-07-16 01:47:12 +000062}