Back to home page

EIC code displayed by LXR

 
 

    


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

0001 //===- InfoStream.h - PDB Info Stream (Stream 1) 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_INFOSTREAM_H
0010 #define LLVM_DEBUGINFO_PDB_NATIVE_INFOSTREAM_H
0011 
0012 #include "llvm/ADT/StringMap.h"
0013 #include "llvm/DebugInfo/CodeView/GUID.h"
0014 #include "llvm/DebugInfo/PDB/Native/NamedStreamMap.h"
0015 #include "llvm/DebugInfo/PDB/Native/RawConstants.h"
0016 #include "llvm/Support/BinaryStream.h"
0017 #include "llvm/Support/BinaryStreamRef.h"
0018 
0019 #include "llvm/Support/Error.h"
0020 
0021 namespace llvm {
0022 namespace pdb {
0023 struct InfoStreamHeader;
0024 class InfoStream {
0025   friend class InfoStreamBuilder;
0026 
0027 public:
0028   InfoStream(std::unique_ptr<BinaryStream> Stream);
0029 
0030   Error reload();
0031 
0032   uint32_t getStreamSize() const;
0033 
0034   const InfoStreamHeader *getHeader() const { return Header; }
0035 
0036   bool containsIdStream() const;
0037   PdbRaw_ImplVer getVersion() const;
0038   uint32_t getSignature() const;
0039   uint32_t getAge() const;
0040   codeview::GUID getGuid() const;
0041   uint32_t getNamedStreamMapByteSize() const;
0042 
0043   PdbRaw_Features getFeatures() const;
0044   ArrayRef<PdbRaw_FeatureSig> getFeatureSignatures() const;
0045 
0046   const NamedStreamMap &getNamedStreams() const;
0047 
0048   BinarySubstreamRef getNamedStreamsBuffer() const;
0049 
0050   Expected<uint32_t> getNamedStreamIndex(llvm::StringRef Name) const;
0051   StringMap<uint32_t> named_streams() const;
0052 
0053 private:
0054   std::unique_ptr<BinaryStream> Stream;
0055 
0056   const InfoStreamHeader *Header;
0057 
0058   BinarySubstreamRef SubNamedStreams;
0059 
0060   std::vector<PdbRaw_FeatureSig> FeatureSignatures;
0061   PdbRaw_Features Features = PdbFeatureNone;
0062 
0063   uint32_t NamedStreamMapByteSize = 0;
0064 
0065   NamedStreamMap NamedStreams;
0066 };
0067 }
0068 }
0069 
0070 #endif