LLVM  14.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 class PDBFile;
22 
23 class SymbolStream {
24 public:
25  SymbolStream(std::unique_ptr<msf::MappedBlockStream> Stream);
26  ~SymbolStream();
27  Error reload();
28 
30  return SymbolRecords;
31  }
32 
34 
36  getSymbols(bool *HadError) const;
37 
38  Error commit();
39 
40 private:
41  codeview::CVSymbolArray SymbolRecords;
42  std::unique_ptr<msf::MappedBlockStream> Stream;
43 };
44 }
45 }
46 
47 #endif
llvm::pdb::SymbolStream::readRecord
codeview::CVSymbol readRecord(uint32_t Offset) const
Definition: SymbolStream.cpp:43
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::pdb::SymbolStream::commit
Error commit()
Definition: SymbolStream.cpp:41
SymbolRecord.h
llvm::pdb::SymbolStream::~SymbolStream
~SymbolStream()
Definition: SymbolStream.cpp:25
llvm::pdb::SymbolStream
Definition: SymbolStream.h:23
Error.h
Offset
uint64_t Offset
Definition: ELFObjHandler.cpp:81
llvm::pdb::SymbolStream::getSymbolArray
const codeview::CVSymbolArray & getSymbolArray() const
Definition: SymbolStream.h:29
llvm::VarStreamArray< CVSymbol >
llvm::pdb::SymbolStream::reload
Error reload()
Definition: SymbolStream.cpp:27
llvm::pdb::SymbolStream::SymbolStream
SymbolStream(std::unique_ptr< msf::MappedBlockStream > Stream)
Definition: SymbolStream.cpp:22
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:37
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
llvm::iterator_range
A range adaptor for a pair of iterators.
Definition: iterator_range.h:30