LLVM
22.0.0git
lib
DebugInfo
PDB
DIA
DIAEnumTables.cpp
Go to the documentation of this file.
1
//===- DIAEnumTables.cpp - DIA Table 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/DIA/DIAEnumTables.h
"
10
#include "
llvm/DebugInfo/PDB/DIA/DIATable.h
"
11
12
using namespace
llvm
;
13
using namespace
llvm::pdb
;
14
15
DIAEnumTables::DIAEnumTables
(CComPtr<IDiaEnumTables> DiaEnumerator)
16
: Enumerator(DiaEnumerator) {}
17
18
uint32_t
DIAEnumTables::getChildCount
()
const
{
19
LONG
Count
= 0;
20
return
(S_OK == Enumerator->get_Count(&
Count
)) ?
Count
: 0;
21
}
22
23
std::unique_ptr<IPDBTable>
24
DIAEnumTables::getChildAtIndex
(
uint32_t
Index)
const
{
25
CComPtr<IDiaTable> Item;
26
VARIANT Var;
27
Var.vt = VT_UINT;
28
Var.uintVal = Index;
29
if
(S_OK != Enumerator->Item(Var, &Item))
30
return
nullptr
;
31
32
return
std::unique_ptr<IPDBTable>(
new
DIATable
(Item));
33
}
34
35
std::unique_ptr<IPDBTable>
DIAEnumTables::getNext
() {
36
CComPtr<IDiaTable> Item;
37
ULONG CeltFetched = 0;
38
if
(S_OK != Enumerator->Next(1, &Item, &CeltFetched))
39
return
nullptr
;
40
41
return
std::unique_ptr<IPDBTable>(
new
DIATable
(Item));
42
}
43
44
void
DIAEnumTables::reset
() { Enumerator->Reset(); }
DIAEnumTables.h
DIATable.h
llvm::pdb::DIAEnumTables::getChildCount
uint32_t getChildCount() const override
Definition
DIAEnumTables.cpp:18
llvm::pdb::DIAEnumTables::getChildAtIndex
std::unique_ptr< IPDBTable > getChildAtIndex(uint32_t Index) const override
Definition
DIAEnumTables.cpp:24
llvm::pdb::DIAEnumTables::reset
void reset() override
Definition
DIAEnumTables.cpp:44
llvm::pdb::DIAEnumTables::getNext
std::unique_ptr< IPDBTable > getNext() override
Definition
DIAEnumTables.cpp:35
llvm::pdb::DIAEnumTables::DIAEnumTables
DIAEnumTables(CComPtr< IDiaEnumTables > DiaEnumerator)
Definition
DIAEnumTables.cpp:15
llvm::pdb::DIATable
Definition
DIATable.h:17
uint32_t
llvm::pdb
Definition
LVCodeViewReader.h:44
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition
AddressRanges.h:18
llvm::Count
FunctionAddr VTableAddr Count
Definition
InstrProf.h:139
Generated on
for LLVM by
1.14.0