[Alignment][NFC] Convert StoreInst to MaybeAlign
[llvm-complete.git] / include / llvm / DebugInfo / PDB / Native / InjectedSourceStream.h
blobd0cac3749bcab6c0a67e2a2e6e4398f9acea010d
1 //===- InjectedSourceStream.h - PDB Headerblock Stream Access ---*- 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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_DEBUGINFO_PDB_RAW_PDBINJECTEDSOURCESTREAM_H
10 #define LLVM_DEBUGINFO_PDB_RAW_PDBINJECTEDSOURCESTREAM_H
12 #include "llvm/DebugInfo/PDB/Native/HashTable.h"
13 #include "llvm/DebugInfo/PDB/Native/RawTypes.h"
14 #include "llvm/Support/Error.h"
16 namespace llvm {
17 namespace msf {
18 class MappedBlockStream;
20 namespace pdb {
21 class PDBFile;
22 class PDBStringTable;
24 class InjectedSourceStream {
25 public:
26 InjectedSourceStream(std::unique_ptr<msf::MappedBlockStream> Stream);
27 Error reload(const PDBStringTable &Strings);
29 using const_iterator = HashTable<SrcHeaderBlockEntry>::const_iterator;
30 const_iterator begin() const { return InjectedSourceTable.begin(); }
31 const_iterator end() const { return InjectedSourceTable.end(); }
33 uint32_t size() const { return InjectedSourceTable.size(); }
35 private:
36 std::unique_ptr<msf::MappedBlockStream> Stream;
38 const SrcHeaderBlockHeader* Header;
39 HashTable<SrcHeaderBlockEntry> InjectedSourceTable;
44 #endif