LLVM 19.0.0git
Classes | Public Member Functions | Protected Member Functions | List of all members
llvm::CodeViewDebug Class Reference

Collects and handles line tables information in a CodeView format. More...

#include "CodeGen/AsmPrinter/CodeViewDebug.h"

Inheritance diagram for llvm::CodeViewDebug:
Inheritance graph


struct  LocalVarDef
struct  TypeLoweringScope

Public Member Functions

 CodeViewDebug (AsmPrinter *AP)
void beginModule (Module *M) override
void endModule () override
 Emit the COFF section that holds the line table information.
void beginInstruction (const MachineInstr *MI) override
 Process beginning of an instruction.
- Public Member Functions inherited from llvm::DebugHandlerBase
virtual ~DebugHandlerBase ()
virtual void setSymbolSize (const MCSymbol *Sym, uint64_t Size)
 For symbols that have a size designated (e.g.
virtual void beginModule (Module *M)
virtual void endModule ()=0
virtual void beginInstruction (const MachineInstr *MI)
virtual void endInstruction ()
void beginFunction (const MachineFunction *MF)
void endFunction (const MachineFunction *MF)
void beginBasicBlockSection (const MachineBasicBlock &MBB)
void endBasicBlockSection (const MachineBasicBlock &MBB)
MCSymbolgetLabelBeforeInsn (const MachineInstr *MI)
 Return Label preceding the instruction.
MCSymbolgetLabelAfterInsn (const MachineInstr *MI)
 Return Label immediately following the instruction.
const InstructionOrderinggetInstOrdering () const

Protected Member Functions

void beginFunctionImpl (const MachineFunction *MF) override
 Gather pre-function debug information.
void endFunctionImpl (const MachineFunction *) override
 Gather post-function debug information.
bool moduleIsInFortran ()
 Check if the current module is in Fortran.
- Protected Member Functions inherited from llvm::DebugHandlerBase
 DebugHandlerBase (AsmPrinter *A)
void identifyScopeMarkers ()
 Indentify instructions that are marking the beginning of or ending of a scope.
void requestLabelBeforeInsn (const MachineInstr *MI)
 Ensure that a label will be emitted before MI.
void requestLabelAfterInsn (const MachineInstr *MI)
 Ensure that a label will be emitted after MI.
virtual void beginFunctionImpl (const MachineFunction *MF)=0
virtual void endFunctionImpl (const MachineFunction *MF)=0
virtual void skippedNonDebugFunction ()

Additional Inherited Members

- Static Public Member Functions inherited from llvm::DebugHandlerBase
static uint64_t getBaseTypeSize (const DIType *Ty)
 If this type is derived from a base type then return base type size.
static bool isUnsignedDIType (const DIType *Ty)
 Return true if type encoding is unsigned.
- Protected Attributes inherited from llvm::DebugHandlerBase
AsmPrinterAsm = nullptr
 Target of debug info emission.
MachineModuleInfoMMI = nullptr
 Collected machine module information.
DebugLoc PrevInstLoc
 Previous instruction's location information.
MCSymbolPrevLabel = nullptr
const MachineBasicBlockPrevInstBB = nullptr
DebugLoc PrologEndLoc
 This location indicates end of function prologue and beginning of function body.
const MachineBasicBlockEpilogBeginBlock = nullptr
 This block includes epilogue instructions.
const MachineInstrCurMI = nullptr
 If nonnull, stores the current machine instruction we're processing.
LexicalScopes LScopes
DbgValueHistoryMap DbgValues
 History of DBG_VALUE and clobber instructions for each user variable.
DbgLabelInstrMap DbgLabels
 Mapping of inlined labels and DBG_LABEL machine instruction.
DenseMap< const MachineInstr *, MCSymbol * > LabelsBeforeInsn
 Maps instruction with label emitted before instruction.
DenseMap< const MachineInstr *, MCSymbol * > LabelsAfterInsn
 Maps instruction with label emitted after instruction.

Detailed Description

Collects and handles line tables information in a CodeView format.

Definition at line 55 of file CodeViewDebug.h.

Constructor & Destructor Documentation

◆ CodeViewDebug()

CodeViewDebug::CodeViewDebug ( AsmPrinter AP)

Definition at line 133 of file CodeViewDebug.cpp.

References Allocator.

Member Function Documentation

◆ beginFunctionImpl()

void CodeViewDebug::beginFunctionImpl ( const MachineFunction MF)

Gather pre-function debug information.

Implements llvm::DebugHandlerBase.

Definition at line 1475 of file CodeViewDebug.cpp.

References llvm::DebugHandlerBase::Asm, assert(), llvm::classifyEHPersonality(), llvm::MCStreamer::emitCVFuncIdDirective(), llvm::MachineFunction::exposesReturnsTwice(), llvm::MachineInstr::FrameSetup, llvm::Triple::getArch(), llvm::MachineFrameInfo::getCVBytesOfCalleeSavedRegisters(), llvm::DebugLoc::getFnDebugLoc(), llvm::MachineFunction::getFrameInfo(), llvm::TargetSubtargetInfo::getFrameLowering(), llvm::MachineFunction::getFunction(), llvm::AsmPrinter::getFunctionBegin(), llvm::MachineModuleInfo::getModule(), llvm::MachineFrameInfo::getOffsetAdjustment(), llvm::TargetMachine::getOptLevel(), llvm::Function::getPersonalityFn(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFrameInfo::getStackSize(), llvm::MachineFunction::getSubtarget(), llvm::Module::getTargetTriple(), llvm::Function::hasFnAttribute(), llvm::TargetFrameLowering::hasFP(), llvm::MachineFunction::hasInlineAsm(), llvm::Function::hasOptNone(), llvm::Function::hasOptSize(), llvm::Function::hasPersonalityFn(), llvm::Function::hasProfileData(), llvm::Function::hasStackProtectorFnAttr(), llvm::MachineFrameInfo::hasStackProtectorIndex(), llvm::MachineFrameInfo::hasVarSizedObjects(), llvm::isAsynchronousEHPersonality(), isThumb(), MBB, MI, llvm::DebugHandlerBase::MMI, llvm::None, llvm::DebugHandlerBase::PrologEndLoc, llvm::DebugHandlerBase::requestLabelAfterInsn(), llvm::DebugHandlerBase::requestLabelBeforeInsn(), llvm::Triple::thumb, llvm::AsmPrinter::TM, and TRI.

◆ beginInstruction()

void CodeViewDebug::beginInstruction ( const MachineInstr MI)

◆ beginModule()

void CodeViewDebug::beginModule ( Module M)

◆ endFunctionImpl()

void CodeViewDebug::endFunctionImpl ( const MachineFunction MF)

◆ endModule()

void CodeViewDebug::endModule ( )

◆ moduleIsInFortran()

bool llvm::CodeViewDebug::moduleIsInFortran ( )

Check if the current module is in Fortran.

Definition at line 511 of file CodeViewDebug.h.

The documentation for this class was generated from the following files: