llvm/llvm/lib/MC/MCCodeView.cpp

//===- MCCodeView.h - Machine Code CodeView support -------------*- 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
//
//===----------------------------------------------------------------------===//
//
// Holds state from .cv_file and .cv_loc directives for later emission.
//
//===----------------------------------------------------------------------===//

#include "llvm/MC/MCCodeView.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/DebugInfo/CodeView/CodeView.h"
#include "llvm/DebugInfo/CodeView/Line.h"
#include "llvm/DebugInfo/CodeView/SymbolRecord.h"
#include "llvm/MC/MCAssembler.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCObjectStreamer.h"
#include "llvm/MC/MCValue.h"
#include "llvm/Support/EndianStream.h"

usingnamespacellvm;
usingnamespacellvm::codeview;

CodeViewContext::~CodeViewContext() {}

/// This is a valid number for use with .cv_loc if we've already seen a .cv_file
/// for it.
bool CodeViewContext::isValidFileNumber(unsigned FileNumber) const {}

bool CodeViewContext::addFile(MCStreamer &OS, unsigned FileNumber,
                              StringRef Filename,
                              ArrayRef<uint8_t> ChecksumBytes,
                              uint8_t ChecksumKind) {}

MCCVFunctionInfo *CodeViewContext::getCVFunctionInfo(unsigned FuncId) {}

bool CodeViewContext::recordFunctionId(unsigned FuncId) {}

bool CodeViewContext::recordInlinedCallSiteId(unsigned FuncId, unsigned IAFunc,
                                              unsigned IAFile, unsigned IALine,
                                              unsigned IACol) {}

void CodeViewContext::recordCVLoc(MCContext &Ctx, const MCSymbol *Label,
                                  unsigned FunctionId, unsigned FileNo,
                                  unsigned Line, unsigned Column,
                                  bool PrologueEnd, bool IsStmt) {}

MCDataFragment *CodeViewContext::getStringTableFragment() {}

std::pair<StringRef, unsigned> CodeViewContext::addToStringTable(StringRef S) {}

unsigned CodeViewContext::getStringTableOffset(StringRef S) {}

void CodeViewContext::emitStringTable(MCObjectStreamer &OS) {}

void CodeViewContext::emitFileChecksums(MCObjectStreamer &OS) {}

// Output checksum table offset of the given file number.  It is possible that
// not all files have been registered yet, and so the offset cannot be
// calculated.  In this case a symbol representing the offset is emitted, and
// the value of this symbol will be fixed up at a later time.
void CodeViewContext::emitFileChecksumOffset(MCObjectStreamer &OS,
                                             unsigned FileNo) {}

void CodeViewContext::addLineEntry(const MCCVLoc &LineEntry) {}

std::vector<MCCVLoc>
CodeViewContext::getFunctionLineEntries(unsigned FuncId) {}

std::pair<size_t, size_t> CodeViewContext::getLineExtent(unsigned FuncId) {}

std::pair<size_t, size_t>
CodeViewContext::getLineExtentIncludingInlinees(unsigned FuncId) {}

ArrayRef<MCCVLoc> CodeViewContext::getLinesForExtent(size_t L, size_t R) {}

void CodeViewContext::emitLineTableForFunction(MCObjectStreamer &OS,
                                               unsigned FuncId,
                                               const MCSymbol *FuncBegin,
                                               const MCSymbol *FuncEnd) {}

static bool compressAnnotation(uint32_t Data, SmallVectorImpl<char> &Buffer) {}

static bool compressAnnotation(BinaryAnnotationsOpCode Annotation,
                               SmallVectorImpl<char> &Buffer) {}

static uint32_t encodeSignedNumber(uint32_t Data) {}

void CodeViewContext::emitInlineLineTableForFunction(MCObjectStreamer &OS,
                                                     unsigned PrimaryFunctionId,
                                                     unsigned SourceFileId,
                                                     unsigned SourceLineNum,
                                                     const MCSymbol *FnStartSym,
                                                     const MCSymbol *FnEndSym) {}

MCFragment *CodeViewContext::emitDefRange(
    MCObjectStreamer &OS,
    ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,
    StringRef FixedSizePortion) {}

static unsigned computeLabelDiff(const MCAssembler &Asm, const MCSymbol *Begin,
                                 const MCSymbol *End) {}

void CodeViewContext::encodeInlineLineTable(const MCAssembler &Asm,
                                            MCCVInlineLineTableFragment &Frag) {}

void CodeViewContext::encodeDefRange(const MCAssembler &Asm,
                                     MCCVDefRangeFragment &Frag) {}