10 #ifndef LLVM_DEBUGINFO_PDB_RAW_PDBDBISTREAMBUILDER_H
11 #define LLVM_DEBUGINFO_PDB_RAW_PDBDBISTREAMBUILDER_H
34 struct DbiStreamHeader;
35 class DbiModuleDescriptorBuilder;
78 static std::vector<SecMapEntry>
88 uint32_t calculateModiSubstreamSize()
const;
89 uint32_t calculateNamesOffset()
const;
90 uint32_t calculateSectionContribsStreamSize()
const;
91 uint32_t calculateSectionMapStreamSize()
const;
92 uint32_t calculateFileInfoSubstreamSize()
const;
93 uint32_t calculateNamesBufferSize()
const;
94 uint32_t calculateDbgStreamsSize()
const;
96 Error generateFileInfoSubstream();
103 uint16_t BuildNumber;
104 uint16_t PdbDllVersion;
114 std::vector<DbiModuleDescriptorBuilder *> ModiList;
121 std::vector<SectionContrib> SectionContribs;
uint32_t addECName(StringRef Name)
Error finalizeMsfLayout()
An implementation of BinaryStream which holds its entire data set in a single contiguous buffer...
uint32_t calculateSerializedLength() const
A Module instance is used to store all the information related to an LLVM module. ...
void setSectionMap(ArrayRef< SecMapEntry > SecMap)
void setMachineType(PDB_Machine M)
static std::vector< SecMapEntry > createSectionMap(ArrayRef< llvm::object::coff_section > SecHdrs)
void addSectionContrib(DbiModuleDescriptorBuilder *ModuleDbi, const llvm::object::coff_section *SecHdr)
Tagged union holding either a T or a Error.
void setSymbolRecordStreamIndex(uint32_t Index)
Error addDbgStream(pdb::DbgHeaderType Type, ArrayRef< uint8_t > Data)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
const uint16_t kInvalidStreamIndex
DbiStreamBuilder & operator=(const DbiStreamBuilder &)=delete
The instances of the Type class are immutable: once they are created, they are never changed...
Allocate memory in an ever growing pool, as if by bump-pointer.
void setBuildNumber(uint16_t B)
Expected< uint32_t > getSourceFileNameIndex(StringRef FileName)
void setFlags(uint16_t F)
void setVersionHeader(PdbRaw_DbiVer V)
void setPdbDllRbld(uint16_t R)
Error commit(const msf::MSFLayout &Layout, WritableBinaryStreamRef MsfBuffer)
void setPdbDllVersion(uint16_t V)
Expected< DbiModuleDescriptorBuilder & > addModuleInfo(StringRef ModuleName)
StringMap - This is an unconventional map that is specialized for handling keys that are "strings"...
Error addModuleSourceFile(StringRef Module, StringRef File)
void setPublicsStreamIndex(uint32_t Index)
DbiStreamBuilder(msf::MSFBuilder &Msf)
Lightweight error class with error context and mandatory checking.
StringRef - Represent a constant reference to a string, i.e.