Back to home page

EIC code displayed by LXR

 
 

    


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

0001 //===-- VectorIterator.h ----------------------------------------------*- C++
0002 //-*-===//
0003 //
0004 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0005 // See https://llvm.org/LICENSE.txt for license information.
0006 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0007 //
0008 //===----------------------------------------------------------------------===//
0009 
0010 #ifndef LLDB_DATAFORMATTERS_VECTORITERATOR_H
0011 #define LLDB_DATAFORMATTERS_VECTORITERATOR_H
0012 
0013 #include "lldb/lldb-forward.h"
0014 
0015 #include "lldb/DataFormatters/TypeSynthetic.h"
0016 #include "lldb/Target/ExecutionContext.h"
0017 #include "lldb/Utility/ConstString.h"
0018 #include "llvm/ADT/SmallVector.h"
0019 
0020 namespace lldb_private {
0021 namespace formatters {
0022 class VectorIteratorSyntheticFrontEnd : public SyntheticChildrenFrontEnd {
0023 public:
0024   VectorIteratorSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp,
0025                                   llvm::ArrayRef<ConstString> item_names);
0026 
0027   llvm::Expected<uint32_t> CalculateNumChildren() override;
0028 
0029   lldb::ValueObjectSP GetChildAtIndex(uint32_t idx) override;
0030 
0031   lldb::ChildCacheState Update() override;
0032 
0033   bool MightHaveChildren() override;
0034 
0035   size_t GetIndexOfChildWithName(ConstString name) override;
0036 
0037 private:
0038   ExecutionContextRef m_exe_ctx_ref;
0039   llvm::SmallVector<ConstString, 2> m_item_names;
0040   lldb::ValueObjectSP m_item_sp;
0041 };
0042 
0043 } // namespace formatters
0044 } // namespace lldb_private
0045 
0046 #endif // LLDB_DATAFORMATTERS_VECTORITERATOR_H