Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:42:59

0001 //===-- ValueObjectConstResultChild.h ----------------------------*- C++-*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLDB_VALUEOBJECT_VALUEOBJECTCONSTRESULTCHILD_H
0010 #define LLDB_VALUEOBJECT_VALUEOBJECTCONSTRESULTCHILD_H
0011 
0012 #include "lldb/Symbol/CompilerType.h"
0013 #include "lldb/Utility/ConstString.h"
0014 #include "lldb/ValueObject/ValueObjectChild.h"
0015 #include "lldb/ValueObject/ValueObjectConstResultImpl.h"
0016 #include "lldb/lldb-defines.h"
0017 #include "lldb/lldb-forward.h"
0018 #include "lldb/lldb-types.h"
0019 
0020 #include <cstddef>
0021 #include <cstdint>
0022 
0023 namespace lldb_private {
0024 class DataExtractor;
0025 class Status;
0026 class ValueObject;
0027 
0028 // A child of a ValueObjectConstResult.
0029 class ValueObjectConstResultChild : public ValueObjectChild {
0030 public:
0031   ValueObjectConstResultChild(
0032       ValueObject &parent, const CompilerType &compiler_type, ConstString name,
0033       uint32_t byte_size, int32_t byte_offset, uint32_t bitfield_bit_size,
0034       uint32_t bitfield_bit_offset, bool is_base_class, bool is_deref_of_parent,
0035       lldb::addr_t live_address, uint64_t language_flags);
0036 
0037   ~ValueObjectConstResultChild() override;
0038 
0039   lldb::ValueObjectSP Dereference(Status &error) override;
0040 
0041   virtual CompilerType GetCompilerType() {
0042     return ValueObjectChild::GetCompilerType();
0043   }
0044 
0045   lldb::ValueObjectSP GetSyntheticChildAtOffset(
0046       uint32_t offset, const CompilerType &type, bool can_create,
0047       ConstString name_const_str = ConstString()) override;
0048 
0049   lldb::ValueObjectSP AddressOf(Status &error) override;
0050 
0051   lldb::addr_t GetAddressOf(bool scalar_is_load_address = true,
0052                             AddressType *address_type = nullptr) override;
0053 
0054   size_t GetPointeeData(DataExtractor &data, uint32_t item_idx = 0,
0055                         uint32_t item_count = 1) override;
0056 
0057   lldb::ValueObjectSP DoCast(const CompilerType &compiler_type) override;
0058 
0059 protected:
0060   ValueObjectConstResultImpl m_impl;
0061 
0062 private:
0063   friend class ValueObject;
0064   friend class ValueObjectConstResult;
0065   friend class ValueObjectConstResultImpl;
0066 
0067   ValueObject *CreateChildAtIndex(size_t idx) override {
0068     return m_impl.CreateChildAtIndex(idx);
0069   }
0070   ValueObject *CreateSyntheticArrayMember(size_t idx) override {
0071     return m_impl.CreateSyntheticArrayMember(idx);
0072   }
0073 
0074   ValueObjectConstResultChild(const ValueObjectConstResultChild &) = delete;
0075   const ValueObjectConstResultChild &
0076   operator=(const ValueObjectConstResultChild &) = delete;
0077 };
0078 
0079 } // namespace lldb_private
0080 
0081 #endif // LLDB_VALUEOBJECT_VALUEOBJECTCONSTRESULTCHILD_H