|
LLVM
4.0.0
|
A debug info location. More...
#include <DebugLoc.h>
Static Public Member Functions | |
| static DebugLoc | get (unsigned Line, unsigned Col, const MDNode *Scope, const MDNode *InlinedAt=nullptr) |
| Create a new DebugLoc. More... | |
A debug info location.
This class is a wrapper around a tracking reference to an DILocation pointer.
To avoid extra includes, DebugLoc doubles the DILocation API with a one based on relatively opaque MDNode pointers.
Definition at line 34 of file DebugLoc.h.
|
default |
Referenced by dump(), get(), and getFnDebugLoc().
| DebugLoc::DebugLoc | ( | const DILocation * | L | ) |
Construct from an DILocation.
Definition at line 18 of file DebugLoc.cpp.
Construct from an MDNode.
Note: if N is not an DILocation, a verifier check will fail, and accessors will crash. However, construction from other nodes is supported in order to handle forward references when reading textual IR.
Definition at line 19 of file DebugLoc.cpp.
| LLVM_DUMP_METHOD void DebugLoc::dump | ( | ) | const |
Definition at line 69 of file DebugLoc.cpp.
References llvm::dbgs(), DebugLoc(), getCol(), getInlinedAt(), and getLine().
| DILocation * DebugLoc::get | ( | ) | const |
Get the underlying DILocation.
isa<DILocation>(getAsMDNode()). Definition at line 21 of file DebugLoc.cpp.
References llvm::TypedTrackingMDRef< T >::get().
Referenced by llvm::X86FrameLowering::adjustForHiPEPrologue(), llvm::X86FrameLowering::adjustForSegmentedStacks(), llvm::DiagnosticInfoOptimizationBase::Argument::Argument(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::MipsSEFrameLowering::emitEpilogue(), llvm::MSP430FrameLowering::emitEpilogue(), llvm::X86FrameLowering::emitEpilogue(), llvm::AVRFrameLowering::emitPrologue(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::MSP430FrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), emitThumb1LoadConstPool(), getFnDebugLoc(), llvm::PPCRegisterInfo::lowerCRBitRestore(), llvm::PPCRegisterInfo::lowerCRBitSpilling(), llvm::PPCRegisterInfo::lowerCRRestore(), llvm::PPCRegisterInfo::lowerCRSpilling(), llvm::PPCRegisterInfo::lowerDynamicAlloc(), llvm::PPCRegisterInfo::lowerDynamicAreaOffset(), llvm::PPCRegisterInfo::lowerVRSAVERestore(), llvm::PPCRegisterInfo::lowerVRSAVESpilling(), llvm::X86FrameLowering::processFunctionBeforeFrameFinalized(), llvm::AVRFrameLowering::restoreCalleeSavedRegisters(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), llvm::X86FrameLowering::restoreCalleeSavedRegisters(), llvm::X86FrameLowering::restoreWin32EHStackPointers(), llvm::InsertNOPLoad::runOnMachineFunction(), llvm::FixFSMULD::runOnMachineFunction(), llvm::ReplaceFMULS::runOnMachineFunction(), llvm::FixAllFDIVSQRT::runOnMachineFunction(), llvm::AVRDynAllocaSR::runOnMachineFunction(), llvm::AVRFrameLowering::spillCalleeSavedRegisters(), llvm::X86FrameLowering::spillCalleeSavedRegisters(), llvm::stripNonLineTableDebugInfo(), and updateInlinedAtInfo().
|
static |
Create a new DebugLoc.
Create a new DebugLoc at the specified line/col and scope/inline. This forwards to DILocation::get().
If !Scope, returns a default-constructed DebugLoc.
FIXME: Remove this. Users should use DILocation::get().
Definition at line 58 of file DebugLoc.cpp.
References DebugLoc(), llvm::MDNode::get(), and llvm::MDNode::getContext().
|
inline |
Return this as a bar MDNode.
Definition at line 103 of file DebugLoc.h.
| unsigned DebugLoc::getCol | ( | ) | const |
Definition at line 30 of file DebugLoc.cpp.
References assert().
Referenced by llvm::DwarfDebug::beginInstruction(), dump(), llvm::NVPTXAsmPrinter::emitLineNumberAsDotLoc(), llvm::yaml::MappingTraits< DebugLoc >::mapping(), print(), printDebugLoc(), and updateInlinedAtInfo().
| DebugLoc DebugLoc::getFnDebugLoc | ( | ) | const |
Find the debug info location for the start of the function.
Walk up the scope chain of given debug loc and find line number info for the function.
FIXME: Remove this. Users should use DILocation/DILocalScope API to find the subprogram, and then DILocation::get().
Definition at line 49 of file DebugLoc.cpp.
References DebugLoc(), get(), llvm::getDISubprogram(), and getInlinedAtScope().
Referenced by llvm::CodeViewDebug::beginFunction().
| DILocation * DebugLoc::getInlinedAt | ( | ) | const |
Definition at line 40 of file DebugLoc.cpp.
References assert().
Referenced by dump(), print(), and printDebugLoc().
| MDNode * DebugLoc::getInlinedAtScope | ( | ) | const |
Get the fully inlined-at scope for a DebugLoc.
Gets the inlined-at scope for a DebugLoc.
Definition at line 45 of file DebugLoc.cpp.
Referenced by getFnDebugLoc().
| unsigned DebugLoc::getLine | ( | ) | const |
Definition at line 25 of file DebugLoc.cpp.
References assert().
Referenced by llvm::DwarfDebug::beginInstruction(), dump(), llvm::NVPTXAsmPrinter::emitLineNumberAsDotLoc(), functionHasLines(), llvm::yaml::MappingTraits< DebugLoc >::mapping(), print(), printDebugLoc(), and updateInlinedAtInfo().
| MDNode * DebugLoc::getScope | ( | ) | const |
Definition at line 35 of file DebugLoc.cpp.
References assert().
Referenced by llvm::DwarfDebug::beginInstruction(), llvm::NVPTXAsmPrinter::emitLineNumberAsDotLoc(), llvm::yaml::MappingTraits< DebugLoc >::mapping(), print(), printDebugLoc(), and updateInlinedAtInfo().
|
inline |
Check whether this has a trivial destructor.
Definition at line 70 of file DebugLoc.h.
References llvm::TypedTrackingMDRef< T >::hasTrivialDestructor().
Referenced by llvm::SDNode::SDNode(), and llvm::MachineInstr::setDebugLoc().
|
inlineexplicit |
Check for null.
Check for null in a way that is safe with broken debug info. Unlike the conversion to DILocation, this doesn't require that Loc is of the right type. Important for cases like llvm::StripDebugInfo() and Instruction::hasMetadata().
Definition at line 67 of file DebugLoc.h.
|
inline |
Definition at line 56 of file DebugLoc.h.
Definition at line 106 of file DebugLoc.h.
|
inline |
Definition at line 58 of file DebugLoc.h.
|
inline |
Definition at line 57 of file DebugLoc.h.
Definition at line 105 of file DebugLoc.h.
| void DebugLoc::print | ( | raw_ostream & | OS | ) | const |
prints source location /path/to/file.exe:line:col @[inlined at]
Definition at line 85 of file DebugLoc.cpp.
References getCol(), getInlinedAt(), getLine(), and getScope().
Referenced by llvm::MachineInstr::print().
1.8.6