blob: 8f0c0f1522f2f46a3590fc8c453a7de5681883d8 [file] [log] [blame]
Siva Chandraf8877ef2015-07-16 01:47:12 +00001//===-- ValueObjectConstResultCast.cpp --------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#include "lldb/Core/ValueObjectConstResultCast.h"
11
12#include "lldb/Core/ValueObjectConstResult.h"
13#include "lldb/Core/ValueObjectList.h"
14
15#include "lldb/Symbol/ClangASTContext.h"
16
17using namespace lldb_private;
18
19ValueObjectConstResultCast::ValueObjectConstResultCast(
20 ValueObject &parent,
21 const ConstString &name,
Greg Claytona1e5dc82015-08-11 22:53:00 +000022 const CompilerType &cast_type,
Siva Chandraf8877ef2015-07-16 01:47:12 +000023 lldb::addr_t live_address) :
24 ValueObjectCast (parent, name, cast_type),
25 m_impl(this, live_address)
26{
27 m_name = name;
28}
29
30ValueObjectConstResultCast::~ValueObjectConstResultCast()
31{
32}
33
34lldb::ValueObjectSP
35ValueObjectConstResultCast::Dereference (Error &error)
36{
37 return m_impl.Dereference(error);
38}
39
40lldb::ValueObjectSP
41ValueObjectConstResultCast::GetSyntheticChildAtOffset(uint32_t offset,
Greg Claytona1e5dc82015-08-11 22:53:00 +000042 const CompilerType& type,
Siva Chandraf8877ef2015-07-16 01:47:12 +000043 bool can_create)
44{
45 return m_impl.GetSyntheticChildAtOffset(offset, type, can_create);
46}
47
48lldb::ValueObjectSP
49ValueObjectConstResultCast::AddressOf (Error &error)
50{
51 return m_impl.AddressOf(error);
52}
53
54ValueObject *
55ValueObjectConstResultCast::CreateChildAtIndex (size_t idx,
56 bool synthetic_array_member,
57 int32_t synthetic_index)
58{
59 return m_impl.CreateChildAtIndex(
60 idx, synthetic_array_member, synthetic_index);
61}
62
63size_t
64ValueObjectConstResultCast::GetPointeeData (DataExtractor& data,
65 uint32_t item_idx,
66 uint32_t item_count)
67{
68 return m_impl.GetPointeeData(data, item_idx, item_count);
69}
70
71lldb::ValueObjectSP
Bruce Mitchener3ad353f2015-09-24 03:54:50 +000072ValueObjectConstResultCast::Cast (const CompilerType &compiler_type)
Siva Chandraf8877ef2015-07-16 01:47:12 +000073{
Bruce Mitchener3ad353f2015-09-24 03:54:50 +000074 return m_impl.Cast(compiler_type);
Siva Chandraf8877ef2015-07-16 01:47:12 +000075}