]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectConstResultCast.h
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / Core / ValueObjectConstResultCast.h
1 //===-- ValueObjectConstResultCast.h ----------------------------*- 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 #ifndef liblldb_ValueObjectConstResultCast_h_
11 #define liblldb_ValueObjectConstResultCast_h_
12
13 #include "lldb/Core/ValueObjectCast.h"
14 #include "lldb/Core/ValueObjectConstResultImpl.h"
15 #include "lldb/Symbol/CompilerType.h"
16 #include "lldb/Utility/ConstString.h"
17 #include "lldb/lldb-defines.h"
18 #include "lldb/lldb-forward.h"
19 #include "lldb/lldb-types.h"
20
21 #include <stddef.h>
22 #include <stdint.h>
23
24 namespace lldb_private {
25 class DataExtractor;
26 }
27 namespace lldb_private {
28 class Status;
29 }
30 namespace lldb_private {
31 class ValueObject;
32 }
33
34 namespace lldb_private {
35
36 class ValueObjectConstResultCast : public ValueObjectCast {
37 public:
38   ValueObjectConstResultCast(ValueObject &parent, const ConstString &name,
39                              const CompilerType &cast_type,
40                              lldb::addr_t live_address = LLDB_INVALID_ADDRESS);
41
42   ~ValueObjectConstResultCast() override;
43
44   lldb::ValueObjectSP Dereference(Status &error) override;
45
46   ValueObject *CreateChildAtIndex(size_t idx, bool synthetic_array_member,
47                                   int32_t synthetic_index) override;
48
49   virtual CompilerType GetCompilerType() {
50     return ValueObjectCast::GetCompilerType();
51   }
52
53   lldb::ValueObjectSP GetSyntheticChildAtOffset(
54       uint32_t offset, const CompilerType &type, bool can_create,
55       ConstString name_const_str = ConstString()) override;
56
57   lldb::ValueObjectSP AddressOf(Status &error) override;
58
59   size_t GetPointeeData(DataExtractor &data, uint32_t item_idx = 0,
60                         uint32_t item_count = 1) override;
61
62   lldb::ValueObjectSP Cast(const CompilerType &compiler_type) override;
63
64 protected:
65   ValueObjectConstResultImpl m_impl;
66
67 private:
68   friend class ValueObject;
69   friend class ValueObjectConstResult;
70   friend class ValueObjectConstResultImpl;
71
72   DISALLOW_COPY_AND_ASSIGN(ValueObjectConstResultCast);
73 };
74
75 } // namespace lldb_private
76
77 #endif // liblldb_ValueObjectConstResultCast_h_