LLVM  8.0.1
InfoStream.h
Go to the documentation of this file.
1 //===- InfoStream.h - PDB Info Stream (Stream 1) Access ---------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_DEBUGINFO_PDB_RAW_PDBINFOSTREAM_H
11 #define LLVM_DEBUGINFO_PDB_RAW_PDBINFOSTREAM_H
12 
13 #include "llvm/ADT/BitmaskEnum.h"
14 #include "llvm/ADT/StringMap.h"
20 
21 #include "llvm/Support/Endian.h"
22 #include "llvm/Support/Error.h"
23 
24 namespace llvm {
25 namespace pdb {
26 class InfoStreamBuilder;
27 class PDBFile;
28 
29 class InfoStream {
30  friend class InfoStreamBuilder;
31 
32 public:
33  InfoStream(std::unique_ptr<BinaryStream> Stream);
34 
35  Error reload();
36 
37  uint32_t getStreamSize() const;
38 
39  const InfoStreamHeader *getHeader() const { return Header; }
40 
41  bool containsIdStream() const;
42  PdbRaw_ImplVer getVersion() const;
43  uint32_t getSignature() const;
44  uint32_t getAge() const;
45  codeview::GUID getGuid() const;
47 
50 
51  const NamedStreamMap &getNamedStreams() const;
52 
54 
57 
58 private:
59  std::unique_ptr<BinaryStream> Stream;
60 
61  const InfoStreamHeader *Header;
62 
63  BinarySubstreamRef SubNamedStreams;
64 
65  std::vector<PdbRaw_FeatureSig> FeatureSignatures;
67 
68  uint32_t NamedStreamMapByteSize = 0;
69 
70  NamedStreamMap NamedStreams;
71 };
72 }
73 }
74 
75 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:24
BinarySubstreamRef getNamedStreamsBuffer() const
Definition: InfoStream.cpp:130
const FeatureBitset Features
StringMap< uint32_t > named_streams() const
Definition: InfoStream.cpp:96
PdbRaw_Features getFeatures() const
Definition: InfoStream.cpp:120
InfoStream(std::unique_ptr< BinaryStream > Stream)
Definition: InfoStream.cpp:23
amdgpu Simplify well known AMD library false Value Value const Twine & Name
uint32_t getStreamSize() const
Definition: InfoStream.cpp:87
This represents the &#39;GUID&#39; type from windows.h.
Definition: GUID.h:22
Tagged union holding either a T or a Error.
Definition: CachePruning.h:23
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Definition: APInt.h:33
ArrayRef< PdbRaw_FeatureSig > getFeatureSignatures() const
Definition: InfoStream.cpp:122
const InfoStreamHeader * getHeader() const
Definition: InfoStream.h:39
PdbRaw_ImplVer getVersion() const
Definition: InfoStream.cpp:104
uint32_t getAge() const
Definition: InfoStream.cpp:112
uint32_t getSignature() const
Definition: InfoStream.cpp:108
The header preceeding the global PDB Stream (Stream 1)
Definition: RawTypes.h:305
codeview::GUID getGuid() const
Definition: InfoStream.cpp:114
Expected< uint32_t > getNamedStreamIndex(llvm::StringRef Name) const
Definition: InfoStream.cpp:89
const NamedStreamMap & getNamedStreams() const
Definition: InfoStream.cpp:126
Lightweight error class with error context and mandatory checking.
Definition: Error.h:158
bool containsIdStream() const
Definition: InfoStream.cpp:100
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
uint32_t getNamedStreamMapByteSize() const
Definition: InfoStream.cpp:116