File indexing completed on 2026-05-10 08:43:44
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLVM_DEBUGINFO_PDB_NATIVE_INFOSTREAMBUILDER_H
0010 #define LLVM_DEBUGINFO_PDB_NATIVE_INFOSTREAMBUILDER_H
0011
0012 #include "llvm/Support/Error.h"
0013
0014 #include "llvm/DebugInfo/CodeView/GUID.h"
0015 #include "llvm/DebugInfo/PDB/Native/RawConstants.h"
0016
0017 namespace llvm {
0018 class WritableBinaryStreamRef;
0019
0020 namespace msf {
0021 class MSFBuilder;
0022 struct MSFLayout;
0023 }
0024 namespace pdb {
0025 class NamedStreamMap;
0026
0027 class InfoStreamBuilder {
0028 public:
0029 InfoStreamBuilder(msf::MSFBuilder &Msf, NamedStreamMap &NamedStreams);
0030 InfoStreamBuilder(const InfoStreamBuilder &) = delete;
0031 InfoStreamBuilder &operator=(const InfoStreamBuilder &) = delete;
0032
0033 void setVersion(PdbRaw_ImplVer V);
0034 void addFeature(PdbRaw_FeatureSig Sig);
0035
0036
0037
0038 void setHashPDBContentsToGUID(bool B);
0039
0040
0041 void setSignature(uint32_t S);
0042 void setAge(uint32_t A);
0043 void setGuid(codeview::GUID G);
0044
0045 bool hashPDBContentsToGUID() const { return HashPDBContentsToGUID; }
0046 uint32_t getAge() const { return Age; }
0047 codeview::GUID getGuid() const { return Guid; }
0048 std::optional<uint32_t> getSignature() const { return Signature; }
0049
0050 uint32_t finalize();
0051
0052 Error finalizeMsfLayout();
0053
0054 Error commit(const msf::MSFLayout &Layout,
0055 WritableBinaryStreamRef Buffer) const;
0056
0057 private:
0058 msf::MSFBuilder &Msf;
0059
0060 std::vector<PdbRaw_FeatureSig> Features;
0061 PdbRaw_ImplVer Ver;
0062 uint32_t Age;
0063 std::optional<uint32_t> Signature;
0064 codeview::GUID Guid;
0065
0066 bool HashPDBContentsToGUID = false;
0067
0068 NamedStreamMap &NamedStreams;
0069 };
0070 }
0071 }
0072
0073 #endif