LLVM  15.0.0git
SymbolStream.h
Go to the documentation of this file.
1 //===- SymbolStream.cpp - PDB Symbol 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_SYMBOLSTREAM_H
10 #define LLVM_DEBUGINFO_PDB_NATIVE_SYMBOLSTREAM_H
11 
13 
14 #include "llvm/Support/Error.h"
15 
16 namespace llvm {
17 namespace msf {
18 class MappedBlockStream;
19 }
20 namespace pdb {
21 
22 class SymbolStream {
23 public:
24  SymbolStream(std::unique_ptr<msf::MappedBlockStream> Stream);
25  ~SymbolStream();
26  Error reload();
27 
29  return SymbolRecords;
30  }
31 
33 
35  getSymbols(bool *HadError) const;
36 
37  Error commit();
38 
39 private:
40  codeview::CVSymbolArray SymbolRecords;
41  std::unique_ptr<msf::MappedBlockStream> Stream;
42 };
43 } // namespace pdb
44 }
45 
46 #endif
llvm::pdb::SymbolStream::readRecord
codeview::CVSymbol readRecord(uint32_t Offset) const
Definition: SymbolStream.cpp:40
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::pdb::SymbolStream::commit
Error commit()
Definition: SymbolStream.cpp:38
llvm::pdb::SymbolStream::~SymbolStream
~SymbolStream()
llvm::pdb::SymbolStream
Definition: SymbolStream.h:22
Error.h
llvm::pdb::SymbolStream::getSymbolArray
const codeview::CVSymbolArray & getSymbolArray() const
Definition: SymbolStream.h:28
llvm::VarStreamArray< CVSymbol >
llvm::pdb::SymbolStream::reload
Error reload()
Definition: SymbolStream.cpp:24
llvm::pdb::SymbolStream::SymbolStream
SymbolStream(std::unique_ptr< msf::MappedBlockStream > Stream)
Definition: SymbolStream.cpp:19
llvm::codeview::CVRecord
CVRecord is a fat pointer (base + size pair) to a symbol or type record.
Definition: CVRecord.h:29
uint32_t
llvm::pdb::SymbolStream::getSymbols
iterator_range< codeview::CVSymbolArray::Iterator > getSymbols(bool *HadError) const
Definition: SymbolStream.cpp:34
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:155
CVRecord.h
llvm::iterator_range
A range adaptor for a pair of iterators.
Definition: iterator_range.h:30