9#ifndef LLVM_DEBUGINFO_PDB_NATIVE_DBISTREAMBUILDER_H
10#define LLVM_DEBUGINFO_PDB_NATIVE_DBISTREAMBUILDER_H
29class BinaryStreamWriter;
38class DbiModuleDescriptorBuilder;
80 SectionContribs.emplace_back(SC);
94 uint32_t calculateModiSubstreamSize()
const;
95 uint32_t calculateNamesOffset()
const;
96 uint32_t calculateSectionContribsStreamSize()
const;
97 uint32_t calculateSectionMapStreamSize()
const;
98 uint32_t calculateFileInfoSubstreamSize()
const;
99 uint32_t calculateNamesBufferSize()
const;
100 uint32_t calculateDbgStreamsSize()
const;
102 Error generateFileInfoSubstream();
107 std::optional<PdbRaw_DbiVer> VerHeader;
118 const DbiStreamHeader *Header;
120 std::vector<std::unique_ptr<DbiModuleDescriptorBuilder>> ModiList;
122 std::optional<codeview::DebugFrameDataSubsection> NewFpoData;
123 std::vector<object::FpoData> OldFpoData;
127 PDBStringTableBuilder ECNamesBuilder;
130 std::vector<SectionContrib> SectionContribs;
131 std::vector<SecMapEntry> SectionMap;
This file defines the StringMap class.
This file defines the BumpPtrAllocator interface.
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Provides write only access to a subclass of WritableBinaryStream.
Allocate memory in an ever growing pool, as if by bump-pointer.
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
A Module instance is used to store all the information related to an LLVM module.
An implementation of BinaryStream which holds its entire data set in a single contiguous buffer.
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
StringRef - Represent a constant reference to a string, i.e.
The instances of the Type class are immutable: once they are created, they are never changed.
void addSectionContrib(const SectionContrib &SC)
void createSectionMap(ArrayRef< llvm::object::coff_section > SecHdrs)
void addOldFpoData(const object::FpoData &Fpo)
void setPublicsStreamIndex(uint32_t Index)
void setFlags(uint16_t F)
Error addModuleSourceFile(DbiModuleDescriptorBuilder &Module, StringRef File)
DbiStreamBuilder(const DbiStreamBuilder &)=delete
void setGlobalsStreamIndex(uint32_t Index)
Expected< uint32_t > getSourceFileNameIndex(StringRef FileName)
Error finalizeMsfLayout()
DbiStreamBuilder & operator=(const DbiStreamBuilder &)=delete
void setSymbolRecordStreamIndex(uint32_t Index)
void addNewFpoData(const codeview::FrameData &FD)
void setVersionHeader(PdbRaw_DbiVer V)
Error commit(const msf::MSFLayout &Layout, WritableBinaryStreamRef MsfBuffer)
Expected< DbiModuleDescriptorBuilder & > addModuleInfo(StringRef ModuleName)
uint32_t calculateSerializedLength() const
Error addDbgStream(pdb::DbgHeaderType Type, ArrayRef< uint8_t > Data)
uint32_t addECName(StringRef Name)
void setBuildNumber(uint16_t B)
void setPdbDllVersion(uint16_t V)
void setMachineType(PDB_Machine M)
void setPdbDllRbld(uint16_t R)
const uint16_t kInvalidStreamIndex
This is an optimization pass for GlobalISel generic memory operations.
Data in the SUBSEC_FRAMEDATA subection.