Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:43:44

0001 //===- InjectedSourceStream.h - PDB Headerblock Stream Access ---*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLVM_DEBUGINFO_PDB_NATIVE_INJECTEDSOURCESTREAM_H
0010 #define LLVM_DEBUGINFO_PDB_NATIVE_INJECTEDSOURCESTREAM_H
0011 
0012 #include "llvm/DebugInfo/MSF/MappedBlockStream.h"
0013 #include "llvm/DebugInfo/PDB/Native/HashTable.h"
0014 #include "llvm/Support/Error.h"
0015 
0016 namespace llvm {
0017 namespace pdb {
0018 struct SrcHeaderBlockEntry;
0019 struct SrcHeaderBlockHeader;
0020 class PDBStringTable;
0021 
0022 class InjectedSourceStream {
0023 public:
0024   InjectedSourceStream(std::unique_ptr<msf::MappedBlockStream> Stream);
0025   Error reload(const PDBStringTable &Strings);
0026 
0027   using const_iterator = HashTable<SrcHeaderBlockEntry>::const_iterator;
0028   const_iterator begin() const { return InjectedSourceTable.begin(); }
0029   const_iterator end() const { return InjectedSourceTable.end(); }
0030 
0031   uint32_t size() const { return InjectedSourceTable.size(); }
0032 
0033 private:
0034   std::unique_ptr<msf::MappedBlockStream> Stream;
0035 
0036   const SrcHeaderBlockHeader* Header;
0037   HashTable<SrcHeaderBlockEntry> InjectedSourceTable;
0038 };
0039 }
0040 } // namespace llvm
0041 
0042 #endif