#include "llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/BinaryFormat/COFF.h"
#include "llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h"
#include "llvm/DebugInfo/MSF/MSFBuilder.h"
#include "llvm/DebugInfo/MSF/MappedBlockStream.h"
#include "llvm/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.h"
#include "llvm/DebugInfo/PDB/Native/RawError.h"
#include "llvm/Object/COFF.h"
#include "llvm/Support/BinaryStreamWriter.h"
#include "llvm/Support/Parallel.h"
#include "llvm/Support/TimeProfiler.h"
usingnamespacellvm;
usingnamespacellvm::codeview;
usingnamespacellvm::msf;
usingnamespacellvm::pdb;
DbiStreamBuilder::DbiStreamBuilder(msf::MSFBuilder &Msf)
: … { … }
DbiStreamBuilder::~DbiStreamBuilder() = default;
void DbiStreamBuilder::setVersionHeader(PdbRaw_DbiVer V) { … }
void DbiStreamBuilder::setAge(uint32_t A) { … }
void DbiStreamBuilder::setBuildNumber(uint16_t B) { … }
void DbiStreamBuilder::setBuildNumber(uint8_t Major, uint8_t Minor) { … }
void DbiStreamBuilder::setPdbDllVersion(uint16_t V) { … }
void DbiStreamBuilder::setPdbDllRbld(uint16_t R) { … }
void DbiStreamBuilder::setFlags(uint16_t F) { … }
void DbiStreamBuilder::setMachineType(PDB_Machine M) { … }
void DbiStreamBuilder::setMachineType(COFF::MachineTypes M) { … }
void DbiStreamBuilder::setGlobalsStreamIndex(uint32_t Index) { … }
void DbiStreamBuilder::setSymbolRecordStreamIndex(uint32_t Index) { … }
void DbiStreamBuilder::setPublicsStreamIndex(uint32_t Index) { … }
void DbiStreamBuilder::addNewFpoData(const codeview::FrameData &FD) { … }
void DbiStreamBuilder::addOldFpoData(const object::FpoData &FD) { … }
Error DbiStreamBuilder::addDbgStream(pdb::DbgHeaderType Type,
ArrayRef<uint8_t> Data) { … }
uint32_t DbiStreamBuilder::addECName(StringRef Name) { … }
uint32_t DbiStreamBuilder::calculateSerializedLength() const { … }
Expected<DbiModuleDescriptorBuilder &>
DbiStreamBuilder::addModuleInfo(StringRef ModuleName) { … }
Error DbiStreamBuilder::addModuleSourceFile(DbiModuleDescriptorBuilder &Module,
StringRef File) { … }
Expected<uint32_t> DbiStreamBuilder::getSourceFileNameIndex(StringRef File) { … }
uint32_t DbiStreamBuilder::calculateModiSubstreamSize() const { … }
uint32_t DbiStreamBuilder::calculateSectionContribsStreamSize() const { … }
uint32_t DbiStreamBuilder::calculateSectionMapStreamSize() const { … }
uint32_t DbiStreamBuilder::calculateNamesOffset() const { … }
uint32_t DbiStreamBuilder::calculateFileInfoSubstreamSize() const { … }
uint32_t DbiStreamBuilder::calculateNamesBufferSize() const { … }
uint32_t DbiStreamBuilder::calculateDbgStreamsSize() const { … }
Error DbiStreamBuilder::generateFileInfoSubstream() { … }
Error DbiStreamBuilder::finalize() { … }
Error DbiStreamBuilder::finalizeMsfLayout() { … }
static uint16_t toSecMapFlags(uint32_t Flags) { … }
void DbiStreamBuilder::createSectionMap(
ArrayRef<llvm::object::coff_section> SecHdrs) { … }
Error DbiStreamBuilder::commit(const msf::MSFLayout &Layout,
WritableBinaryStreamRef MsfBuffer) { … }