1//==- NativeEnumInjectedSources.cpp - Native Injected Source Enumerator --*-==//
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#ifndef LLVM_DEBUGINFO_PDB_NATIVE_NATIVEENUMINJECTEDSOURCES_H
10#define LLVM_DEBUGINFO_PDB_NATIVE_NATIVEENUMINJECTEDSOURCES_H
11
12#include "llvm/DebugInfo/PDB/IPDBEnumChildren.h"
13#include "llvm/DebugInfo/PDB/IPDBInjectedSource.h"
14#include "llvm/DebugInfo/PDB/Native/InjectedSourceStream.h"
15
16namespace llvm {
17namespace pdb {
18
19class InjectedSourceStream;
20class PDBStringTable;
21
22class NativeEnumInjectedSources : public IPDBEnumChildren<IPDBInjectedSource> {
23public:
24  NativeEnumInjectedSources(PDBFile &File, const InjectedSourceStream &IJS,
25                            const PDBStringTable &Strings);
26
27  uint32_t getChildCount() const override;
28  std::unique_ptr<IPDBInjectedSource>
29  getChildAtIndex(uint32_t Index) const override;
30  std::unique_ptr<IPDBInjectedSource> getNext() override;
31  void reset() override;
32
33private:
34  PDBFile &File;
35  const InjectedSourceStream &Stream;
36  const PDBStringTable &Strings;
37  InjectedSourceStream::const_iterator Cur;
38};
39
40} // namespace pdb
41} // namespace llvm
42
43#endif
44