class CodeViewContext
Declaration
class CodeViewContext { /* full declaration omitted */ };
Description
Holds state from .cv_file and .cv_loc directives for later emission.
Declared at: llvm/include/llvm/MC/MCCodeView.h:137
Method Overview
- public CodeViewContext()
- public bool addFile(llvm::MCStreamer & OS, unsigned int FileNumber, llvm::StringRef Filename, ArrayRef<uint8_t> ChecksumBytes, uint8_t ChecksumKind)
- public void addLineEntry(const llvm::MCCVLoc & LineEntry)
- public std::pair<StringRef, unsigned int> addToStringTable(llvm::StringRef S)
- public llvm::MCFragment * emitDefRange(llvm::MCObjectStreamer & OS, ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges, llvm::StringRef FixedSizePortion)
- public void emitFileChecksumOffset(llvm::MCObjectStreamer & OS, unsigned int FileNo)
- public void emitFileChecksums(llvm::MCObjectStreamer & OS)
- public void emitInlineLineTableForFunction(llvm::MCObjectStreamer & OS, unsigned int PrimaryFunctionId, unsigned int SourceFileId, unsigned int SourceLineNum, const llvm::MCSymbol * FnStartSym, const llvm::MCSymbol * FnEndSym)
- public void emitLineTableForFunction(llvm::MCObjectStreamer & OS, unsigned int FuncId, const llvm::MCSymbol * FuncBegin, const llvm::MCSymbol * FuncEnd)
- public void emitStringTable(llvm::MCObjectStreamer & OS)
- public void encodeDefRange(llvm::MCAsmLayout & Layout, llvm::MCCVDefRangeFragment & F)
- public void encodeInlineLineTable(llvm::MCAsmLayout & Layout, llvm::MCCVInlineLineTableFragment & F)
- public llvm::MCCVFunctionInfo * getCVFunctionInfo(unsigned int FuncId)
- public std::vector<MCCVLoc> getFunctionLineEntries(unsigned int FuncId)
- public std::pair<size_t, size_t> getLineExtent(unsigned int FuncId)
- public ArrayRef<llvm::MCCVLoc> getLinesForExtent(size_t L, size_t R)
- public bool isValidCVFileNumber(unsigned int FileNumber)
- public bool isValidFileNumber(unsigned int FileNumber) const
- public void recordCVLoc(llvm::MCContext & Ctx, const llvm::MCSymbol * Label, unsigned int FunctionId, unsigned int FileNo, unsigned int Line, unsigned int Column, bool PrologueEnd, bool IsStmt)
- public bool recordFunctionId(unsigned int FuncId)
- public bool recordInlinedCallSiteId(unsigned int FuncId, unsigned int IAFunc, unsigned int IAFile, unsigned int IALine, unsigned int IACol)
- public ~CodeViewContext()
Methods
¶CodeViewContext()
CodeViewContext()
Declared at: llvm/include/llvm/MC/MCCodeView.h:139
¶bool addFile(llvm::MCStreamer& OS,
unsigned int FileNumber,
llvm::StringRef Filename,
ArrayRef<uint8_t> ChecksumBytes,
uint8_t ChecksumKind)
bool addFile(llvm::MCStreamer& OS,
unsigned int FileNumber,
llvm::StringRef Filename,
ArrayRef<uint8_t> ChecksumBytes,
uint8_t ChecksumKind)
Declared at: llvm/include/llvm/MC/MCCodeView.h:143
Parameters
- llvm::MCStreamer& OS
- unsigned int FileNumber
- llvm::StringRef Filename
- ArrayRef<uint8_t> ChecksumBytes
- uint8_t ChecksumKind
¶void addLineEntry(const llvm::MCCVLoc& LineEntry)
void addLineEntry(const llvm::MCCVLoc& LineEntry)
Description
Add a line entry.
Declared at: llvm/include/llvm/MC/MCCodeView.h:172
Parameters
- const llvm::MCCVLoc& LineEntry
¶std::pair<StringRef, unsigned int>
addToStringTable(llvm::StringRef S)
std::pair<StringRef, unsigned int>
addToStringTable(llvm::StringRef S)
Description
Add something to the string table. Returns the final string as well as offset into the string table.
Declared at: llvm/include/llvm/MC/MCCodeView.h:214
Parameters
¶llvm::MCFragment* emitDefRange(
llvm::MCObjectStreamer& OS,
ArrayRef<std::pair<const MCSymbol*,
const MCSymbol*>> Ranges,
llvm::StringRef FixedSizePortion)
llvm::MCFragment* emitDefRange(
llvm::MCObjectStreamer& OS,
ArrayRef<std::pair<const MCSymbol*,
const MCSymbol*>> Ranges,
llvm::StringRef FixedSizePortion)
Declared at: llvm/include/llvm/MC/MCCodeView.h:197
Parameters
- llvm::MCObjectStreamer& OS
- ArrayRef< std::pair<const MCSymbol*, const MCSymbol*>> Ranges
- llvm::StringRef FixedSizePortion
¶void emitFileChecksumOffset(
llvm::MCObjectStreamer& OS,
unsigned int FileNo)
void emitFileChecksumOffset(
llvm::MCObjectStreamer& OS,
unsigned int FileNo)
Description
Emits the offset into the checksum table of the given file number.
Declared at: llvm/include/llvm/MC/MCCodeView.h:210
Parameters
- llvm::MCObjectStreamer& OS
- unsigned int FileNo
¶void emitFileChecksums(llvm::MCObjectStreamer& OS)
void emitFileChecksums(llvm::MCObjectStreamer& OS)
Description
Emits the file checksum substream.
Declared at: llvm/include/llvm/MC/MCCodeView.h:207
Parameters
¶void emitInlineLineTableForFunction(
llvm::MCObjectStreamer& OS,
unsigned int PrimaryFunctionId,
unsigned int SourceFileId,
unsigned int SourceLineNum,
const llvm::MCSymbol* FnStartSym,
const llvm::MCSymbol* FnEndSym)
void emitInlineLineTableForFunction(
llvm::MCObjectStreamer& OS,
unsigned int PrimaryFunctionId,
unsigned int SourceFileId,
unsigned int SourceLineNum,
const llvm::MCSymbol* FnStartSym,
const llvm::MCSymbol* FnEndSym)
Declared at: llvm/include/llvm/MC/MCCodeView.h:185
Parameters
- llvm::MCObjectStreamer& OS
- unsigned int PrimaryFunctionId
- unsigned int SourceFileId
- unsigned int SourceLineNum
- const llvm::MCSymbol* FnStartSym
- const llvm::MCSymbol* FnEndSym
¶void emitLineTableForFunction(
llvm::MCObjectStreamer& OS,
unsigned int FuncId,
const llvm::MCSymbol* FuncBegin,
const llvm::MCSymbol* FuncEnd)
void emitLineTableForFunction(
llvm::MCObjectStreamer& OS,
unsigned int FuncId,
const llvm::MCSymbol* FuncBegin,
const llvm::MCSymbol* FuncEnd)
Description
Emits a line table substream.
Declared at: llvm/include/llvm/MC/MCCodeView.h:181
Parameters
- llvm::MCObjectStreamer& OS
- unsigned int FuncId
- const llvm::MCSymbol* FuncBegin
- const llvm::MCSymbol* FuncEnd
¶void emitStringTable(llvm::MCObjectStreamer& OS)
void emitStringTable(llvm::MCObjectStreamer& OS)
Description
Emits the string table substream.
Declared at: llvm/include/llvm/MC/MCCodeView.h:204
Parameters
¶void encodeDefRange(llvm::MCAsmLayout& Layout,
llvm::MCCVDefRangeFragment& F)
void encodeDefRange(llvm::MCAsmLayout& Layout,
llvm::MCCVDefRangeFragment& F)
Declared at: llvm/include/llvm/MC/MCCodeView.h:201
Parameters
- llvm::MCAsmLayout& Layout
- llvm::MCCVDefRangeFragment& F
¶void encodeInlineLineTable(
llvm::MCAsmLayout& Layout,
llvm::MCCVInlineLineTableFragment& F)
void encodeInlineLineTable(
llvm::MCAsmLayout& Layout,
llvm::MCCVInlineLineTableFragment& F)
Description
Encodes the binary annotations once we have a layout.
Declared at: llvm/include/llvm/MC/MCCodeView.h:193
Parameters
¶llvm::MCCVFunctionInfo* getCVFunctionInfo(
unsigned int FuncId)
llvm::MCCVFunctionInfo* getCVFunctionInfo(
unsigned int FuncId)
Description
Retreive the function info if this is a valid function id, or nullptr.
Declared at: llvm/include/llvm/MC/MCCodeView.h:159
Parameters
- unsigned int FuncId
¶std::vector<MCCVLoc> getFunctionLineEntries(
unsigned int FuncId)
std::vector<MCCVLoc> getFunctionLineEntries(
unsigned int FuncId)
Declared at: llvm/include/llvm/MC/MCCodeView.h:174
Parameters
- unsigned int FuncId
¶std::pair<size_t, size_t> getLineExtent(
unsigned int FuncId)
std::pair<size_t, size_t> getLineExtent(
unsigned int FuncId)
Declared at: llvm/include/llvm/MC/MCCodeView.h:176
Parameters
- unsigned int FuncId
¶ArrayRef<llvm::MCCVLoc> getLinesForExtent(
size_t L,
size_t R)
ArrayRef<llvm::MCCVLoc> getLinesForExtent(
size_t L,
size_t R)
Declared at: llvm/include/llvm/MC/MCCodeView.h:178
Parameters
- size_t L
- size_t R
¶bool isValidCVFileNumber(unsigned int FileNumber)
bool isValidCVFileNumber(unsigned int FileNumber)
Declared at: llvm/include/llvm/MC/MCCodeView.h:169
Parameters
- unsigned int FileNumber
¶bool isValidFileNumber(
unsigned int FileNumber) const
bool isValidFileNumber(
unsigned int FileNumber) const
Declared at: llvm/include/llvm/MC/MCCodeView.h:142
Parameters
- unsigned int FileNumber
¶void recordCVLoc(llvm::MCContext& Ctx,
const llvm::MCSymbol* Label,
unsigned int FunctionId,
unsigned int FileNo,
unsigned int Line,
unsigned int Column,
bool PrologueEnd,
bool IsStmt)
void recordCVLoc(llvm::MCContext& Ctx,
const llvm::MCSymbol* Label,
unsigned int FunctionId,
unsigned int FileNo,
unsigned int Line,
unsigned int Column,
bool PrologueEnd,
bool IsStmt)
Description
Saves the information from the currently parsed .cv_loc directive and sets CVLocSeen. When the next instruction is assembled an entry in the line number table with this information and the address of the instruction will be created.
Declared at: llvm/include/llvm/MC/MCCodeView.h:165
Parameters
- llvm::MCContext& Ctx
- const llvm::MCSymbol* Label
- unsigned int FunctionId
- unsigned int FileNo
- unsigned int Line
- unsigned int Column
- bool PrologueEnd
- bool IsStmt
¶bool recordFunctionId(unsigned int FuncId)
bool recordFunctionId(unsigned int FuncId)
Description
Records the function id of a normal function. Returns false if the function id has already been used, and true otherwise.
Declared at: llvm/include/llvm/MC/MCCodeView.h:148
Parameters
- unsigned int FuncId
¶bool recordInlinedCallSiteId(unsigned int FuncId,
unsigned int IAFunc,
unsigned int IAFile,
unsigned int IALine,
unsigned int IACol)
bool recordInlinedCallSiteId(unsigned int FuncId,
unsigned int IAFunc,
unsigned int IAFile,
unsigned int IALine,
unsigned int IACol)
Description
Records the function id of an inlined call site. Records the "inlined at" location info of the call site, including what function or inlined call site it was inlined into. Returns false if the function id has already been used, and true otherwise.
Declared at: llvm/include/llvm/MC/MCCodeView.h:154
Parameters
- unsigned int FuncId
- unsigned int IAFunc
- unsigned int IAFile
- unsigned int IALine
- unsigned int IACol
¶~CodeViewContext()
~CodeViewContext()
Declared at: llvm/include/llvm/MC/MCCodeView.h:140