LLVM
13.0.0git
lib
DebugInfo
PDB
Native
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
9
#include "
llvm/DebugInfo/PDB/Native/NativeEnumModules.h
"
10
11
#include "
llvm/DebugInfo/PDB/IPDBEnumChildren.h
"
12
#include "
llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h
"
13
#include "
llvm/DebugInfo/PDB/Native/NativeExeSymbol.h
"
14
#include "
llvm/DebugInfo/PDB/Native/NativeSession.h
"
15
#include "
llvm/DebugInfo/PDB/PDBSymbol.h
"
16
#include "
llvm/DebugInfo/PDB/PDBSymbolCompiland.h
"
17
#include "
llvm/DebugInfo/PDB/PDBSymbolExe.h
"
18
19
namespace
llvm
{
20
namespace
pdb {
21
22
NativeEnumModules::NativeEnumModules
(
NativeSession
&PDBSession,
uint32_t
Index
)
23
: Session(PDBSession),
Index
(
Index
) {}
24
25
uint32_t
NativeEnumModules::getChildCount
()
const
{
26
return
Session.
getSymbolCache
().
getNumCompilands
();
27
}
28
29
std::unique_ptr<PDBSymbol>
30
NativeEnumModules::getChildAtIndex
(
uint32_t
N
)
const
{
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
}
llvm
This class represents lattice values for constants.
Definition:
AllocatorList.h:23
NativeCompilandSymbol.h
llvm::pdb::NativeEnumModules::NativeEnumModules
NativeEnumModules(NativeSession &Session, uint32_t Index=0)
Definition:
NativeEnumModules.cpp:22
NativeEnumModules.h
llvm::pdb::NativeEnumModules::getNext
std::unique_ptr< PDBSymbol > getNext() override
Definition:
NativeEnumModules.cpp:34
PDBSymbol.h
llvm::pdb::NativeEnumModules::reset
void reset() override
Definition:
NativeEnumModules.cpp:40
Index
uint32_t Index
Definition:
ELFObjHandler.cpp:84
PDBSymbolCompiland.h
llvm::pdb::NativeSession::getSymbolCache
SymbolCache & getSymbolCache()
Definition:
NativeSession.h:109
IPDBEnumChildren.h
llvm::pdb::SymbolCache::getNumCompilands
uint32_t getNumCompilands() const
Definition:
SymbolCache.cpp:262
llvm::pdb::NativeEnumModules::getChildAtIndex
std::unique_ptr< PDBSymbol > getChildAtIndex(uint32_t Index) const override
Definition:
NativeEnumModules.cpp:30
PDBSymbolExe.h
llvm::pdb::NativeEnumModules::getChildCount
uint32_t getChildCount() const override
Definition:
NativeEnumModules.cpp:25
uint32_t
llvm::pdb::NativeSession
Definition:
NativeSession.h:28
llvm::pdb::SymbolCache::getOrCreateCompiland
std::unique_ptr< PDBSymbolCompiland > getOrCreateCompiland(uint32_t Index)
Definition:
SymbolCache.cpp:592
N
#define N
NativeExeSymbol.h
NativeSession.h
Generated on Fri Mar 5 2021 21:42:32 for LLVM by
1.8.17