LLVM
22.0.0git
lib
DebugInfo
PDB
DIA
DIAEnumInjectedSources.cpp
Go to the documentation of this file.
1
//==- DIAEnumSourceFiles.cpp - DIA Source File 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/DIAEnumInjectedSources.h
"
10
#include "
llvm/DebugInfo/PDB/DIA/DIAInjectedSource.h
"
11
#include "
llvm/DebugInfo/PDB/PDBSymbol.h
"
12
13
using namespace
llvm
;
14
using namespace
llvm::pdb
;
15
16
DIAEnumInjectedSources::DIAEnumInjectedSources
(
17
CComPtr<IDiaEnumInjectedSources> DiaEnumerator)
18
: Enumerator(DiaEnumerator) {}
19
20
uint32_t
DIAEnumInjectedSources::getChildCount
()
const
{
21
LONG
Count
= 0;
22
return
(S_OK == Enumerator->get_Count(&
Count
)) ?
Count
: 0;
23
}
24
25
std::unique_ptr<IPDBInjectedSource>
26
DIAEnumInjectedSources::getChildAtIndex
(
uint32_t
Index)
const
{
27
CComPtr<IDiaInjectedSource> Item;
28
if
(S_OK != Enumerator->Item(Index, &Item))
29
return
nullptr
;
30
31
return
std::unique_ptr<IPDBInjectedSource>(
new
DIAInjectedSource
(Item));
32
}
33
34
std::unique_ptr<IPDBInjectedSource>
DIAEnumInjectedSources::getNext
() {
35
CComPtr<IDiaInjectedSource> Item;
36
ULONG NumFetched = 0;
37
if
(S_OK != Enumerator->Next(1, &Item, &NumFetched))
38
return
nullptr
;
39
40
return
std::unique_ptr<IPDBInjectedSource>(
new
DIAInjectedSource
(Item));
41
}
42
43
void
DIAEnumInjectedSources::reset
() { Enumerator->Reset(); }
DIAEnumInjectedSources.h
DIAInjectedSource.h
PDBSymbol.h
llvm::pdb::DIAEnumInjectedSources::getChildAtIndex
ChildTypePtr getChildAtIndex(uint32_t Index) const override
Definition
DIAEnumInjectedSources.cpp:26
llvm::pdb::DIAEnumInjectedSources::getChildCount
uint32_t getChildCount() const override
Definition
DIAEnumInjectedSources.cpp:20
llvm::pdb::DIAEnumInjectedSources::getNext
ChildTypePtr getNext() override
Definition
DIAEnumInjectedSources.cpp:34
llvm::pdb::DIAEnumInjectedSources::DIAEnumInjectedSources
DIAEnumInjectedSources(CComPtr< IDiaEnumInjectedSources > DiaEnumerator)
Definition
DIAEnumInjectedSources.cpp:16
llvm::pdb::DIAEnumInjectedSources::reset
void reset() override
Definition
DIAEnumInjectedSources.cpp:43
llvm::pdb::DIAInjectedSource
Definition
DIAInjectedSource.h:19
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