File indexing completed on 2026-05-10 08:43:45
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLVM_DEBUGINFO_PDB_IPDBENUMCHILDREN_H
0010 #define LLVM_DEBUGINFO_PDB_IPDBENUMCHILDREN_H
0011
0012 #include "llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h"
0013 #include <cassert>
0014 #include <cstdint>
0015 #include <memory>
0016
0017 namespace llvm {
0018 namespace pdb {
0019
0020 template <typename ChildType> class IPDBEnumChildren {
0021 public:
0022 using ChildTypePtr = std::unique_ptr<ChildType>;
0023 using MyType = IPDBEnumChildren<ChildType>;
0024
0025 virtual ~IPDBEnumChildren() = default;
0026
0027 virtual uint32_t getChildCount() const = 0;
0028 virtual ChildTypePtr getChildAtIndex(uint32_t Index) const = 0;
0029 virtual ChildTypePtr getNext() = 0;
0030 virtual void reset() = 0;
0031 };
0032
0033 template <typename ChildType>
0034 class NullEnumerator : public IPDBEnumChildren<ChildType> {
0035 uint32_t getChildCount() const override { return 0; }
0036 std::unique_ptr<ChildType> getChildAtIndex(uint32_t Index) const override {
0037 return nullptr;
0038 }
0039 std::unique_ptr<ChildType> getNext() override { return nullptr; }
0040 void reset() override {}
0041 };
0042
0043 }
0044 }
0045
0046 #endif