llvm/llvm/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp

//===- DbiStreamBuilder.cpp - PDB Dbi Stream Creation -----------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#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) {}

// Populate the Section Map from COFF section headers.
//
// A Section Map seem to be a copy of a COFF section list in other format.
// I don't know why a PDB file contains both a COFF section header and
// a Section Map, but it seems it must be present in a PDB.
void DbiStreamBuilder::createSectionMap(
    ArrayRef<llvm::object::coff_section> SecHdrs) {}

Error DbiStreamBuilder::commit(const msf::MSFLayout &Layout,
                               WritableBinaryStreamRef MsfBuffer) {}