LLVM  14.0.0git
InjectedSourceStream.h
Go to the documentation of this file.
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 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_DEBUGINFO_PDB_NATIVE_INJECTEDSOURCESTREAM_H
10 #define LLVM_DEBUGINFO_PDB_NATIVE_INJECTEDSOURCESTREAM_H
11 
14 #include "llvm/Support/Error.h"
15 
16 namespace llvm {
17 namespace msf {
18 class MappedBlockStream;
19 }
20 namespace pdb {
21 class PDBStringTable;
22 
24 public:
25  InjectedSourceStream(std::unique_ptr<msf::MappedBlockStream> Stream);
26  Error reload(const PDBStringTable &Strings);
27 
29  const_iterator begin() const { return InjectedSourceTable.begin(); }
30  const_iterator end() const { return InjectedSourceTable.end(); }
31 
32  uint32_t size() const { return InjectedSourceTable.size(); }
33 
34 private:
35  std::unique_ptr<msf::MappedBlockStream> Stream;
36 
37  const SrcHeaderBlockHeader* Header;
38  HashTable<SrcHeaderBlockEntry> InjectedSourceTable;
39 };
40 }
41 }
42 
43 #endif
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::pdb::InjectedSourceStream::reload
Error reload(const PDBStringTable &Strings)
Definition: InjectedSourceStream.cpp:28
llvm::pdb::HashTable::end
const_iterator end() const
Definition: HashTable.h:217
RawTypes.h
Error.h
llvm::pdb::InjectedSourceStream::begin
const_iterator begin() const
Definition: InjectedSourceStream.h:29
HashTable.h
llvm::pdb::SrcHeaderBlockHeader
The header preceding the /src/headerblock stream.
Definition: RawTypes.h:321
llvm::pdb::InjectedSourceStream
Definition: InjectedSourceStream.h:23
llvm::pdb::HashTable::begin
const_iterator begin() const
Definition: HashTable.h:216
llvm::pdb::PDBStringTable
Definition: PDBStringTable.h:32
llvm::pdb::HashTable::size
uint32_t size() const
Definition: HashTable.h:214
uint32_t
llvm::pdb::InjectedSourceStream::InjectedSourceStream
InjectedSourceStream(std::unique_ptr< msf::MappedBlockStream > Stream)
Definition: InjectedSourceStream.cpp:24
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
llvm::pdb::HashTable
Definition: HashTable.h:34
llvm::pdb::InjectedSourceStream::size
uint32_t size() const
Definition: InjectedSourceStream.h:32
llvm::pdb::InjectedSourceStream::end
const_iterator end() const
Definition: InjectedSourceStream.h:30
llvm::pdb::InjectedSourceStream::const_iterator
HashTable< SrcHeaderBlockEntry >::const_iterator const_iterator
Definition: InjectedSourceStream.h:28