• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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                   codeview::TypeLeafKind Kind);
30 
31   uint32_t getChildCount() const override;
32   std::unique_ptr<PDBSymbol> getChildAtIndex(uint32_t Index) const override;
33   std::unique_ptr<PDBSymbol> getNext() override;
34   void reset() override;
35   NativeEnumTypes *clone() const override;
36 
37 private:
38   NativeEnumTypes(NativeSession &Session,
39                   const std::vector<codeview::TypeIndex> &Matches,
40                   codeview::TypeLeafKind Kind);
41 
42   std::vector<codeview::TypeIndex> Matches;
43   uint32_t Index;
44   NativeSession &Session;
45   codeview::TypeLeafKind Kind;
46 };
47 
48 } // namespace pdb
49 } // namespace llvm
50 
51 #endif
52