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 16 namespace llvm { 17 namespace pdb { 18 19 class InjectedSourceStream; 20 class PDBStringTable; 21 22 class NativeEnumInjectedSources : public IPDBEnumChildren<IPDBInjectedSource> { 23 public: 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 33 private: 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