LLVM  10.0.0svn
NativeEnumModules.cpp
Go to the documentation of this file.
1 //==- NativeEnumModules.cpp - Native Symbol Enumerator impl ------*- C++ -*-==//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
10 
18 
19 namespace llvm {
20 namespace pdb {
21 
23  : Session(PDBSession), Index(Index) {}
24 
26  return Session.getSymbolCache().getNumCompilands();
27 }
28 
29 std::unique_ptr<PDBSymbol>
31  return Session.getSymbolCache().getOrCreateCompiland(N);
32 }
33 
34 std::unique_ptr<PDBSymbol> NativeEnumModules::getNext() {
35  if (Index >= getChildCount())
36  return nullptr;
37  return getChildAtIndex(Index++);
38 }
39 
40 void NativeEnumModules::reset() { Index = 0; }
41 
42 }
43 }
This class represents lattice values for constants.
Definition: AllocatorList.h:23
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()