2015-07-16 09:47:12 +08:00
|
|
|
//===-- ValueObjectConstResultCast.cpp --------------------------*- C++ -*-===//
|
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2015-07-16 09:47:12 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "lldb/Core/ValueObjectConstResultCast.h"
|
|
|
|
|
2017-04-07 05:28:29 +08:00
|
|
|
namespace lldb_private {
|
|
|
|
class DataExtractor;
|
|
|
|
}
|
|
|
|
namespace lldb_private {
|
2017-05-12 12:51:55 +08:00
|
|
|
class Status;
|
2017-04-07 05:28:29 +08:00
|
|
|
}
|
|
|
|
namespace lldb_private {
|
|
|
|
class ValueObject;
|
|
|
|
}
|
2015-07-16 09:47:12 +08:00
|
|
|
|
|
|
|
using namespace lldb_private;
|
|
|
|
|
|
|
|
ValueObjectConstResultCast::ValueObjectConstResultCast(
|
2019-03-07 05:22:25 +08:00
|
|
|
ValueObject &parent, ConstString name, const CompilerType &cast_type,
|
2016-09-07 04:57:50 +08:00
|
|
|
lldb::addr_t live_address)
|
|
|
|
: ValueObjectCast(parent, name, cast_type), m_impl(this, live_address) {
|
|
|
|
m_name = name;
|
2015-07-16 09:47:12 +08:00
|
|
|
}
|
|
|
|
|
2016-09-07 04:57:50 +08:00
|
|
|
ValueObjectConstResultCast::~ValueObjectConstResultCast() {}
|
2015-07-16 09:47:12 +08:00
|
|
|
|
2017-05-12 12:51:55 +08:00
|
|
|
lldb::ValueObjectSP ValueObjectConstResultCast::Dereference(Status &error) {
|
2016-09-07 04:57:50 +08:00
|
|
|
return m_impl.Dereference(error);
|
2015-07-16 09:47:12 +08:00
|
|
|
}
|
|
|
|
|
2016-09-07 04:57:50 +08:00
|
|
|
lldb::ValueObjectSP ValueObjectConstResultCast::GetSyntheticChildAtOffset(
|
|
|
|
uint32_t offset, const CompilerType &type, bool can_create,
|
|
|
|
ConstString name_const_str) {
|
|
|
|
return m_impl.GetSyntheticChildAtOffset(offset, type, can_create,
|
|
|
|
name_const_str);
|
2015-07-16 09:47:12 +08:00
|
|
|
}
|
|
|
|
|
2017-05-12 12:51:55 +08:00
|
|
|
lldb::ValueObjectSP ValueObjectConstResultCast::AddressOf(Status &error) {
|
2016-09-07 04:57:50 +08:00
|
|
|
return m_impl.AddressOf(error);
|
2015-07-16 09:47:12 +08:00
|
|
|
}
|
|
|
|
|
2016-09-07 04:57:50 +08:00
|
|
|
ValueObject *ValueObjectConstResultCast::CreateChildAtIndex(
|
|
|
|
size_t idx, bool synthetic_array_member, int32_t synthetic_index) {
|
|
|
|
return m_impl.CreateChildAtIndex(idx, synthetic_array_member,
|
|
|
|
synthetic_index);
|
2015-07-16 09:47:12 +08:00
|
|
|
}
|
|
|
|
|
2016-09-07 04:57:50 +08:00
|
|
|
size_t ValueObjectConstResultCast::GetPointeeData(DataExtractor &data,
|
|
|
|
uint32_t item_idx,
|
|
|
|
uint32_t item_count) {
|
|
|
|
return m_impl.GetPointeeData(data, item_idx, item_count);
|
2015-07-16 09:47:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
lldb::ValueObjectSP
|
2016-09-07 04:57:50 +08:00
|
|
|
ValueObjectConstResultCast::Cast(const CompilerType &compiler_type) {
|
|
|
|
return m_impl.Cast(compiler_type);
|
2015-07-16 09:47:12 +08:00
|
|
|
}
|