Back to home page

EIC code displayed by LXR

 
 

    


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

0001 //===- SymbolStream.cpp - PDB Symbol 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_SYMBOLSTREAM_H
0010 #define LLVM_DEBUGINFO_PDB_NATIVE_SYMBOLSTREAM_H
0011 
0012 #include "llvm/DebugInfo/CodeView/CVRecord.h"
0013 
0014 #include "llvm/Support/Error.h"
0015 
0016 namespace llvm {
0017 namespace msf {
0018 class MappedBlockStream;
0019 }
0020 namespace pdb {
0021 
0022 class SymbolStream {
0023 public:
0024   SymbolStream(std::unique_ptr<msf::MappedBlockStream> Stream);
0025   ~SymbolStream();
0026   Error reload();
0027 
0028   const codeview::CVSymbolArray &getSymbolArray() const {
0029     return SymbolRecords;
0030   }
0031 
0032   codeview::CVSymbol readRecord(uint32_t Offset) const;
0033 
0034   iterator_range<codeview::CVSymbolArray::Iterator>
0035   getSymbols(bool *HadError) const;
0036 
0037   Error commit();
0038 
0039 private:
0040   codeview::CVSymbolArray SymbolRecords;
0041   std::unique_ptr<msf::MappedBlockStream> Stream;
0042 };
0043 } // namespace pdb
0044 }
0045 
0046 #endif