LLVM
15.0.0git
|
Collects and handles line tables information in a CodeView format. More...
#include "CodeGen/AsmPrinter/CodeViewDebug.h"
Classes | |
struct | LocalVarDef |
struct | TypeLoweringScope |
Public Member Functions | |
CodeViewDebug (AsmPrinter *AP) | |
void | beginModule (Module *M) override |
void | setSymbolSize (const MCSymbol *, uint64_t) override |
For symbols that have a size designated (e.g. More... | |
void | endModule () override |
Emit the COFF section that holds the line table information. More... | |
void | beginInstruction (const MachineInstr *MI) override |
Process beginning of an instruction. More... | |
![]() | |
void | endInstruction () override |
Process end of an instruction. More... | |
void | beginFunction (const MachineFunction *MF) override |
Gather pre-function debug information. More... | |
void | endFunction (const MachineFunction *MF) override |
Gather post-function debug information. More... | |
void | beginBasicBlock (const MachineBasicBlock &MBB) override |
Process beginning of a basic block during basic block sections. More... | |
void | endBasicBlock (const MachineBasicBlock &MBB) override |
Process end of a basic block during basic block sections. More... | |
MCSymbol * | getLabelBeforeInsn (const MachineInstr *MI) |
Return Label preceding the instruction. More... | |
MCSymbol * | getLabelAfterInsn (const MachineInstr *MI) |
Return Label immediately following the instruction. More... | |
const InstructionOrdering & | getInstOrdering () const |
![]() | |
virtual | ~AsmPrinterHandler () |
Pin vtable to this file. More... | |
virtual void | markFunctionEnd () |
virtual void | beginFragment (const MachineBasicBlock *MBB, ExceptionSymbolProvider ESP) |
virtual void | endFragment () |
virtual void | beginFunclet (const MachineBasicBlock &MBB, MCSymbol *Sym=nullptr) |
Emit target-specific EH funclet machinery. More... | |
virtual void | endFunclet () |
Protected Member Functions | |
void | beginFunctionImpl (const MachineFunction *MF) override |
Gather pre-function debug information. More... | |
void | endFunctionImpl (const MachineFunction *) override |
Gather post-function debug information. More... | |
bool | moduleIsInFortran () |
Check if the current module is in Fortran. More... | |
![]() | |
DebugHandlerBase (AsmPrinter *A) | |
void | identifyScopeMarkers () |
Indentify instructions that are marking the beginning of or ending of a scope. More... | |
void | requestLabelBeforeInsn (const MachineInstr *MI) |
Ensure that a label will be emitted before MI. More... | |
void | requestLabelAfterInsn (const MachineInstr *MI) |
Ensure that a label will be emitted after MI. More... | |
virtual void | skippedNonDebugFunction () |
Additional Inherited Members | |
![]() | |
static uint64_t | getBaseTypeSize (const DIType *Ty) |
If this type is derived from a base type then return base type size. More... | |
static bool | isUnsignedDIType (const DIType *Ty) |
Return true if type encoding is unsigned. More... | |
![]() | |
AsmPrinter * | Asm |
Target of debug info emission. More... | |
MachineModuleInfo * | MMI |
Collected machine module information. More... | |
DebugLoc | PrevInstLoc |
Previous instruction's location information. More... | |
MCSymbol * | PrevLabel = nullptr |
const MachineBasicBlock * | PrevInstBB = nullptr |
DebugLoc | PrologEndLoc |
This location indicates end of function prologue and beginning of function body. More... | |
const MachineInstr * | CurMI = nullptr |
If nonnull, stores the current machine instruction we're processing. More... | |
LexicalScopes | LScopes |
DbgValueHistoryMap | DbgValues |
History of DBG_VALUE and clobber instructions for each user variable. More... | |
DbgLabelInstrMap | DbgLabels |
Mapping of inlined labels and DBG_LABEL machine instruction. More... | |
DenseMap< const MachineInstr *, MCSymbol * > | LabelsBeforeInsn |
Maps instruction with label emitted before instruction. More... | |
DenseMap< const MachineInstr *, MCSymbol * > | LabelsAfterInsn |
Maps instruction with label emitted after instruction. More... | |
Collects and handles line tables information in a CodeView format.
Definition at line 52 of file CodeViewDebug.h.
CodeViewDebug::CodeViewDebug | ( | AsmPrinter * | AP | ) |
Definition at line 134 of file CodeViewDebug.cpp.
|
overrideprotectedvirtual |
Gather pre-function debug information.
Implements llvm::DebugHandlerBase.
Definition at line 1440 of file CodeViewDebug.cpp.
References llvm::DebugHandlerBase::Asm, assert(), llvm::classifyEHPersonality(), llvm::MCStreamer::EmitCVFuncIdDirective(), llvm::MachineFunction::exposesReturnsTwice(), FramePtr, llvm::MachineInstr::FrameSetup, llvm::MachineFrameInfo::getCVBytesOfCalleeSavedRegisters(), llvm::DebugLoc::getFnDebugLoc(), llvm::MachineFunction::getFrameInfo(), llvm::TargetSubtargetInfo::getFrameLowering(), llvm::MachineFunction::getFunction(), llvm::AsmPrinter::getFunctionBegin(), llvm::MachineFrameInfo::getOffsetAdjustment(), llvm::TargetMachine::getOptLevel(), llvm::Function::getPersonalityFn(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFrameInfo::getStackSize(), llvm::MachineFunction::getSubtarget(), llvm::Function::hasFnAttribute(), llvm::TargetFrameLowering::hasFP(), llvm::MachineFunction::hasInlineAsm(), llvm::Function::hasOptNone(), llvm::Function::hasOptSize(), llvm::Function::hasPersonalityFn(), llvm::Function::hasProfileData(), llvm::MachineFrameInfo::hasStackProtectorIndex(), llvm::TargetRegisterInfo::hasStackRealignment(), llvm::MachineFrameInfo::hasVarSizedObjects(), llvm::isAsynchronousEHPersonality(), MBB, MI, llvm::None, llvm::CodeGenOpt::None, llvm::DebugHandlerBase::PrologEndLoc, llvm::DebugHandlerBase::requestLabelAfterInsn(), llvm::DebugHandlerBase::requestLabelBeforeInsn(), llvm::AsmPrinter::TM, and TRI.
|
overridevirtual |
Process beginning of an instruction.
Reimplemented from llvm::DebugHandlerBase.
Definition at line 3057 of file CodeViewDebug.cpp.
References llvm::DebugHandlerBase::Asm, llvm::DebugHandlerBase::beginInstruction(), DL, llvm::MachineInstr::FrameSetup, isUsableDebugLoc(), llvm::AsmPrinter::MF, MI, and llvm::DebugHandlerBase::PrevInstBB.
|
overridevirtual |
Reimplemented from llvm::DebugHandlerBase.
Definition at line 608 of file CodeViewDebug.cpp.
References llvm::DebugHandlerBase::Asm, llvm::Triple::getArch(), llvm::MCObjectFileInfo::getCOFFDebugSymbolsSection(), llvm::AsmPrinter::getObjFileLowering(), llvm::MachineModuleInfo::hasDebugInfo(), M, mapArchToCVCPUType(), and llvm::DebugHandlerBase::MMI.
|
overrideprotectedvirtual |
Gather post-function debug information.
Implements llvm::DebugHandlerBase.
Definition at line 3004 of file CodeViewDebug.cpp.
References llvm::DebugHandlerBase::Asm, assert(), get, llvm::LexicalScopes::getCurrentFunctionScope(), llvm::MachineFunction::getFunction(), llvm::AsmPrinter::getFunctionEnd(), llvm::DebugHandlerBase::getLabelAfterInsn(), llvm::DebugHandlerBase::getLabelBeforeInsn(), llvm::Function::getSubprogram(), llvm::DebugHandlerBase::LScopes, MBB, and MI.
|
overridevirtual |
Emit the COFF section that holds the line table information.
Implements llvm::AsmPrinterHandler.
Definition at line 633 of file CodeViewDebug.cpp.
References llvm::DebugHandlerBase::Asm, llvm::MachineModuleInfo::hasDebugInfo(), and llvm::DebugHandlerBase::MMI.
|
inlineprotected |
Check if the current module is in Fortran.
Definition at line 485 of file CodeViewDebug.h.
References llvm::codeview::Fortran.
|
inlineoverridevirtual |
For symbols that have a size designated (e.g.
common symbols), this tracks that size.
Implements llvm::AsmPrinterHandler.
Definition at line 494 of file CodeViewDebug.h.