LLVM: llvm::CodeViewContext Class Reference (original) (raw)
Holds state from .cv_file and .cv_loc directives for later emission. More...
#include "[llvm/MC/MCCodeView.h](MCCodeView%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| CodeViewContext (MCContext *MCCtx) | |
| CodeViewContext & | operator= (const CodeViewContext &other)=delete |
| CodeViewContext (const CodeViewContext &other)=delete | |
| void | finish () |
| bool | isValidFileNumber (unsigned FileNumber) const |
| This is a valid number for use with .cv_loc if we've already seen a .cv_file for it. | |
| bool | addFile (MCStreamer &OS, unsigned FileNumber, StringRef Filename, ArrayRef< uint8_t > ChecksumBytes, uint8_t ChecksumKind) |
| bool | recordFunctionId (unsigned FuncId) |
| Records the function id of a normal function. | |
| bool | recordInlinedCallSiteId (unsigned FuncId, unsigned IAFunc, unsigned IAFile, unsigned IALine, unsigned IACol) |
| Records the function id of an inlined call site. | |
| MCCVFunctionInfo * | getCVFunctionInfo (unsigned FuncId) |
| Retreive the function info if this is a valid function id, or nullptr. | |
| void | recordCVLoc (MCContext &Ctx, const MCSymbol *Label, unsigned FunctionId, unsigned FileNo, unsigned Line, unsigned Column, bool PrologueEnd, bool IsStmt) |
| Saves the information from the currently parsed .cv_loc directive and sets CVLocSeen. | |
| void | addLineEntry (const MCCVLoc &LineEntry) |
| Add a line entry. | |
| std::vector< MCCVLoc > | getFunctionLineEntries (unsigned FuncId) |
| std::pair< size_t, size_t > | getLineExtent (unsigned FuncId) |
| std::pair< size_t, size_t > | getLineExtentIncludingInlinees (unsigned FuncId) |
| ArrayRef< MCCVLoc > | getLinesForExtent (size_t L, size_t R) |
| void | emitLineTableForFunction (MCObjectStreamer &OS, unsigned FuncId, const MCSymbol *FuncBegin, const MCSymbol *FuncEnd) |
| Emits a line table substream. | |
| void | emitInlineLineTableForFunction (MCObjectStreamer &OS, unsigned PrimaryFunctionId, unsigned SourceFileId, unsigned SourceLineNum, const MCSymbol *FnStartSym, const MCSymbol *FnEndSym) |
| void | encodeInlineLineTable (const MCAssembler &Asm, MCCVInlineLineTableFragment &F) |
| Encodes the binary annotations once we have a layout. | |
| void | emitDefRange (MCObjectStreamer &OS, ArrayRef< std::pair< const MCSymbol *, const MCSymbol * > > Ranges, StringRef FixedSizePortion) |
| void | encodeDefRange (const MCAssembler &Asm, MCCVDefRangeFragment &F) |
| void | emitStringTable (MCObjectStreamer &OS) |
| Emits the string table substream. | |
| void | emitFileChecksums (MCObjectStreamer &OS) |
| Emits the file checksum substream. | |
| void | emitFileChecksumOffset (MCObjectStreamer &OS, unsigned FileNo) |
| Emits the offset into the checksum table of the given file number. | |
| std::pair< StringRef, unsigned > | addToStringTable (StringRef S) |
| Add something to the string table. |
Holds state from .cv_file and .cv_loc directives for later emission.
Definition at line 144 of file MCCodeView.h.
| llvm::CodeViewContext::CodeViewContext ( MCContext * MCCtx) | inline |
|---|
◆ CodeViewContext() [2/2]
◆ addFile()
◆ addLineEntry()
| void CodeViewContext::addLineEntry | ( | const MCCVLoc & | LineEntry | ) |
|---|
◆ addToStringTable()
Add something to the string table.
Returns the final string as well as offset into the string table.
Definition at line 136 of file MCCodeView.cpp.
Referenced by addFile().
◆ emitDefRange()
◆ emitFileChecksumOffset()
◆ emitFileChecksums()
Emits the file checksum substream.
Definition at line 181 of file MCCodeView.cpp.
References llvm::alignTo(), llvm::MCConstantExpr::create(), llvm::MCObjectStreamer::emitAbsoluteSymbolDiff(), llvm::MCObjectStreamer::emitAssignment(), llvm::MCObjectStreamer::emitBytes(), llvm::MCStreamer::emitInt32(), llvm::MCStreamer::emitInt8(), llvm::MCObjectStreamer::emitLabel(), llvm::MCObjectStreamer::emitValueToAlignment(), llvm::codeview::FileChecksums, llvm::MCStreamer::getContext(), and llvm::toStringRef().
Referenced by llvm::MCObjectStreamer::emitCVFileChecksumsDirective().
◆ emitInlineLineTableForFunction()
◆ emitLineTableForFunction()
Emits a line table substream.
Definition at line 338 of file MCCodeView.cpp.
References llvm::MCStreamer::AddComment(), llvm::any_of(), llvm::MCObjectStreamer::emitAbsoluteSymbolDiff(), llvm::MCStreamer::emitCOFFSecRel32(), llvm::MCStreamer::emitCOFFSectionIndex(), llvm::MCObjectStreamer::emitCVFileChecksumOffsetDirective(), llvm::MCStreamer::emitInt16(), llvm::MCStreamer::emitInt32(), llvm::MCObjectStreamer::emitLabel(), llvm::MCCVLoc::getColumn(), llvm::MCStreamer::getContext(), getFunctionLineEntries(), I, llvm::codeview::LF_HaveColumns, llvm::codeview::Lines, and llvm::codeview::LineInfo::StatementFlag.
Referenced by llvm::MCObjectStreamer::emitCVLinetableDirective().
◆ emitStringTable()
◆ encodeDefRange()
Definition at line 609 of file MCCodeView.cpp.
References assert(), computeLabelDiff(), llvm::MCConstantExpr::create(), llvm::MCFixup::create(), llvm::MCSymbolRefExpr::create(), llvm::MCBinaryExpr::createAdd(), llvm::FK_SecRel_2, llvm::FK_SecRel_4, llvm::MCCVDefRangeFragment::getFixedSizePortion(), llvm::MCCVDefRangeFragment::getRanges(), I, llvm::little, llvm::codeview::MaxDefRange, llvm::SmallVectorTemplateBase< T, bool >::push_back(), Range, llvm::MCFragment::setVarContents(), llvm::MCFragment::setVarFixups(), llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::StringRef::size(), and llvm::support::endian::Writer::write().
◆ encodeInlineLineTable()
Encodes the binary annotations once we have a layout.
Definition at line 472 of file MCCodeView.cpp.
References assert(), llvm::codeview::ChangeCodeLength, llvm::codeview::ChangeCodeOffset, llvm::codeview::ChangeCodeOffsetAndLineOffset, llvm::codeview::ChangeFile, llvm::codeview::ChangeLineOffset, compressAnnotation(), computeLabelDiff(), llvm::ArrayRef< T >::empty(), encodeSignedNumber(), llvm::errs(), llvm::MCCVFunctionInfo::LineInfo::File, llvm::ArrayRef< T >::front(), getCVFunctionInfo(), llvm::MCCVInlineLineTableFragment::getFnEndSym(), llvm::MCCVInlineLineTableFragment::getFnStartSym(), getLineExtentIncludingInlinees(), getLinesForExtent(), llvm::MCSymbol::getSection(), llvm::MCConstantExpr::getValue(), I, llvm::MCCVFunctionInfo::InlinedAtMap, llvm::Length, llvm::MCCVFunctionInfo::LineInfo::Line, llvm_unreachable, llvm::codeview::MaxRecordLength, llvm::MCCVLoc::setFileNum(), llvm::MCCVLoc::setLabel(), llvm::MCCVLoc::setLine(), llvm::MCFragment::setVarContents(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
◆ finish()
| void CodeViewContext::finish | ( | ) |
|---|
◆ getCVFunctionInfo()
◆ getFunctionLineEntries()
| std::vector< MCCVLoc > CodeViewContext::getFunctionLineEntries | ( | unsigned | FuncId | ) |
|---|
◆ getLineExtent()
| std::pair< size_t, size_t > CodeViewContext::getLineExtent | ( | unsigned | FuncId | ) |
|---|
◆ getLineExtentIncludingInlinees()
| std::pair< size_t, size_t > CodeViewContext::getLineExtentIncludingInlinees | ( | unsigned | FuncId | ) |
|---|
◆ getLinesForExtent()
| ArrayRef< MCCVLoc > CodeViewContext::getLinesForExtent | ( | size_t | L, |
|---|---|---|---|
| size_t | R ) |
◆ isValidFileNumber()
| bool CodeViewContext::isValidFileNumber | ( | unsigned | FileNumber | ) | const |
|---|
This is a valid number for use with .cv_loc if we've already seen a .cv_file for it.
Definition at line 37 of file MCCodeView.cpp.
◆ operator=()
◆ recordCVLoc()
◆ recordFunctionId()
◆ recordInlinedCallSiteId()
The documentation for this class was generated from the following files:
- include/llvm/MC/MCCodeView.h
- lib/MC/MCCodeView.cpp