LLVM 20.0.0git
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
10
14
15#include <vector>
16
17using namespace llvm;
18using namespace llvm::codeview;
19using namespace llvm::pdb;
20
22 std::vector<NativeLineNumber> LineNums)
23 : Lines(std::move(LineNums)), Index(0) {}
24
26 return static_cast<uint32_t>(Lines.size());
27}
28
29std::unique_ptr<IPDBLineNumber>
31 if (N >= getChildCount())
32 return nullptr;
33 return std::make_unique<NativeLineNumber>(Lines[N]);
34}
35
36std::unique_ptr<IPDBLineNumber> NativeEnumLineNumbers::getNext() {
37 return getChildAtIndex(Index++);
38}
39
NativeEnumLineNumbers(std::vector< NativeLineNumber > LineNums)
uint32_t getChildCount() const override
ChildTypePtr getChildAtIndex(uint32_t Index) const override
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
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:1856
Implement std::hash so that hash_code can be used in STL containers.
Definition: BitVector.h:858
#define N