LLVM  8.0.0svn
NativeEnumModules.cpp
Go to the documentation of this file.
1 //==- NativeEnumModules.cpp - Native Symbol 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 
11 
19 
20 namespace llvm {
21 namespace pdb {
22 
24  : Session(PDBSession), Index(Index) {}
25 
27  return Session.getSymbolCache().getNumCompilands();
28 }
29 
30 std::unique_ptr<PDBSymbol>
32  return Session.getSymbolCache().getOrCreateCompiland(N);
33 }
34 
35 std::unique_ptr<PDBSymbol> NativeEnumModules::getNext() {
36  if (Index >= getChildCount())
37  return nullptr;
38  return getChildAtIndex(Index++);
39 }
40 
41 void NativeEnumModules::reset() { Index = 0; }
42 
43 }
44 }
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
std::unique_ptr< PDBSymbol > getNext() override
NativeEnumModules(NativeSession &Session, uint32_t Index=0)
std::unique_ptr< PDBSymbolCompiland > getOrCreateCompiland(uint32_t Index)
uint32_t getChildCount() const override
std::unique_ptr< PDBSymbol > getChildAtIndex(uint32_t Index) const override
uint32_t getNumCompilands() const
#define N
SymbolCache & getSymbolCache()