LLVM  15.0.0git
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 
15 
16 namespace llvm {
17 namespace pdb {
18 
20  : Session(PDBSession), Index(Index) {}
21 
23  return Session.getSymbolCache().getNumCompilands();
24 }
25 
26 std::unique_ptr<PDBSymbol>
28  return Session.getSymbolCache().getOrCreateCompiland(N);
29 }
30 
31 std::unique_ptr<PDBSymbol> NativeEnumModules::getNext() {
32  if (Index >= getChildCount())
33  return nullptr;
34  return getChildAtIndex(Index++);
35 }
36 
37 void NativeEnumModules::reset() { Index = 0; }
38 
39 }
40 }
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::pdb::NativeEnumModules::NativeEnumModules
NativeEnumModules(NativeSession &Session, uint32_t Index=0)
Definition: NativeEnumModules.cpp:19
NativeEnumModules.h
llvm::pdb::NativeEnumModules::getNext
std::unique_ptr< PDBSymbol > getNext() override
Definition: NativeEnumModules.cpp:31
PDBSymbol.h
llvm::pdb::NativeEnumModules::reset
void reset() override
Definition: NativeEnumModules.cpp:37
PDBSymbolCompiland.h
llvm::pdb::NativeSession::getSymbolCache
SymbolCache & getSymbolCache()
Definition: NativeSession.h:113
llvm::pdb::SymbolCache::getNumCompilands
uint32_t getNumCompilands() const
Definition: SymbolCache.cpp:267
llvm::pdb::NativeEnumModules::getChildAtIndex
std::unique_ptr< PDBSymbol > getChildAtIndex(uint32_t Index) const override
Definition: NativeEnumModules.cpp:27
llvm::pdb::NativeEnumModules::getChildCount
uint32_t getChildCount() const override
Definition: NativeEnumModules.cpp:22
uint32_t
llvm::pdb::NativeSession
Definition: NativeSession.h:32
llvm::pdb::SymbolCache::getOrCreateCompiland
std::unique_ptr< PDBSymbolCompiland > getOrCreateCompiland(uint32_t Index)
Definition: SymbolCache.cpp:597
N
#define N
SymbolCache.h
NativeSession.h