1 //==- NativeEnumTypes.h - Native Type Enumerator impl ------------*- 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 LLVM_DEBUGINFO_PDB_NATIVE_NATIVEENUMTYPES_H 11 #define LLVM_DEBUGINFO_PDB_NATIVE_NATIVEENUMTYPES_H 12 13 #include "llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h" 14 #include "llvm/DebugInfo/CodeView/TypeRecord.h" 15 #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h" 16 #include "llvm/DebugInfo/PDB/PDBSymbol.h" 17 18 #include <vector> 19 20 namespace llvm { 21 namespace pdb { 22 23 class NativeSession; 24 25 class NativeEnumTypes : public IPDBEnumChildren<PDBSymbol> { 26 public: 27 NativeEnumTypes(NativeSession &Session, 28 codeview::LazyRandomTypeCollection &TypeCollection, 29 std::vector<codeview::TypeLeafKind> Kinds); 30 31 NativeEnumTypes(NativeSession &Session, 32 std::vector<codeview::TypeIndex> Indices); 33 34 uint32_t getChildCount() const override; 35 std::unique_ptr<PDBSymbol> getChildAtIndex(uint32_t Index) const override; 36 std::unique_ptr<PDBSymbol> getNext() override; 37 void reset() override; 38 39 private: 40 std::vector<codeview::TypeIndex> Matches; 41 uint32_t Index; 42 NativeSession &Session; 43 }; 44 45 } // namespace pdb 46 } // namespace llvm 47 48 #endif 49