[Alignment][NFC] Convert StoreInst to MaybeAlign
[llvm-complete.git] / include / llvm / DebugInfo / PDB / Native / InfoStream.h
blob315b09356ae30c2c1148a8acd313a4368623601a
1 //===- InfoStream.h - PDB Info Stream (Stream 1) 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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_DEBUGINFO_PDB_RAW_PDBINFOSTREAM_H
10 #define LLVM_DEBUGINFO_PDB_RAW_PDBINFOSTREAM_H
12 #include "llvm/ADT/BitmaskEnum.h"
13 #include "llvm/ADT/StringMap.h"
14 #include "llvm/DebugInfo/CodeView/GUID.h"
15 #include "llvm/DebugInfo/MSF/MappedBlockStream.h"
16 #include "llvm/DebugInfo/PDB/Native/NamedStreamMap.h"
17 #include "llvm/DebugInfo/PDB/Native/RawConstants.h"
18 #include "llvm/DebugInfo/PDB/PDBTypes.h"
20 #include "llvm/Support/Endian.h"
21 #include "llvm/Support/Error.h"
23 namespace llvm {
24 namespace pdb {
25 class InfoStreamBuilder;
26 class PDBFile;
28 class InfoStream {
29 friend class InfoStreamBuilder;
31 public:
32 InfoStream(std::unique_ptr<BinaryStream> Stream);
34 Error reload();
36 uint32_t getStreamSize() const;
38 const InfoStreamHeader *getHeader() const { return Header; }
40 bool containsIdStream() const;
41 PdbRaw_ImplVer getVersion() const;
42 uint32_t getSignature() const;
43 uint32_t getAge() const;
44 codeview::GUID getGuid() const;
45 uint32_t getNamedStreamMapByteSize() const;
47 PdbRaw_Features getFeatures() const;
48 ArrayRef<PdbRaw_FeatureSig> getFeatureSignatures() const;
50 const NamedStreamMap &getNamedStreams() const;
52 BinarySubstreamRef getNamedStreamsBuffer() const;
54 Expected<uint32_t> getNamedStreamIndex(llvm::StringRef Name) const;
55 StringMap<uint32_t> named_streams() const;
57 private:
58 std::unique_ptr<BinaryStream> Stream;
60 const InfoStreamHeader *Header;
62 BinarySubstreamRef SubNamedStreams;
64 std::vector<PdbRaw_FeatureSig> FeatureSignatures;
65 PdbRaw_Features Features = PdbFeatureNone;
67 uint32_t NamedStreamMapByteSize = 0;
69 NamedStreamMap NamedStreams;
74 #endif