LLVM
17.0.0git
lib
DebugInfo
PDB
Native
NativeEnumLineNumbers.cpp
Go to the documentation of this file.
1
//==- NativeEnumLineNumbers.cpp - Native Type 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/NativeEnumLineNumbers.h
"
10
11
#include "
llvm/DebugInfo/CodeView/CodeView.h
"
12
#include "
llvm/DebugInfo/PDB/IPDBEnumChildren.h
"
13
#include "
llvm/DebugInfo/PDB/Native/NativeLineNumber.h
"
14
15
#include <vector>
16
17
using namespace
llvm
;
18
using namespace
llvm::codeview
;
19
using namespace
llvm::pdb
;
20
21
NativeEnumLineNumbers::NativeEnumLineNumbers
(
22
std::vector<NativeLineNumber> LineNums)
23
:
Lines
(
std
::
move
(LineNums)),
Index
(0) {}
24
25
uint32_t
NativeEnumLineNumbers::getChildCount
()
const
{
26
return
static_cast<
uint32_t
>
(Lines.size());
27
}
28
29
std::unique_ptr<IPDBLineNumber>
30
NativeEnumLineNumbers::getChildAtIndex
(
uint32_t
N
)
const
{
31
if
(
N
>=
getChildCount
())
32
return
nullptr
;
33
return
std::make_unique<NativeLineNumber>(Lines[
N
]);
34
}
35
36
std::unique_ptr<IPDBLineNumber>
NativeEnumLineNumbers::getNext
() {
37
return
getChildAtIndex
(
Index
++);
38
}
39
40
void
NativeEnumLineNumbers::reset
() {
Index
= 0; }
CodeView.h
IPDBEnumChildren.h
NativeEnumLineNumbers.h
NativeLineNumber.h
llvm::pdb::NativeEnumLineNumbers::NativeEnumLineNumbers
NativeEnumLineNumbers(std::vector< NativeLineNumber > LineNums)
Definition:
NativeEnumLineNumbers.cpp:21
llvm::pdb::NativeEnumLineNumbers::reset
void reset() override
Definition:
NativeEnumLineNumbers.cpp:40
llvm::pdb::NativeEnumLineNumbers::getChildCount
uint32_t getChildCount() const override
Definition:
NativeEnumLineNumbers.cpp:25
llvm::pdb::NativeEnumLineNumbers::getNext
ChildTypePtr getNext() override
Definition:
NativeEnumLineNumbers.cpp:36
llvm::pdb::NativeEnumLineNumbers::getChildAtIndex
ChildTypePtr getChildAtIndex(uint32_t Index) const override
Definition:
NativeEnumLineNumbers.cpp:30
uint32_t
llvm::codeview
Definition:
AppendingTypeTableBuilder.h:22
llvm::codeview::DebugSubsectionKind::Lines
@ Lines
llvm::dwarf::Index
Index
Definition:
Dwarf.h:550
llvm::pdb
Definition:
LVCodeViewReader.h:44
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:18
llvm::move
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Definition:
STLExtras.h:1946
std
Definition:
BitVector.h:858
N
#define N
Generated on Mon Mar 27 2023 00:11:02 for LLVM by
1.9.6