LLVM API Documentation
#include <DebugLoc.h>
Public Member Functions | |
DebugLoc () | |
bool | isUnknown () const |
isUnknown - Return true if this is an unknown location. | |
unsigned | getLine () const |
unsigned | getCol () const |
MDNode * | getScope (const LLVMContext &Ctx) const |
MDNode * | getInlinedAt (const LLVMContext &Ctx) const |
void | getScopeAndInlinedAt (MDNode *&Scope, MDNode *&IA, const LLVMContext &Ctx) const |
getScopeAndInlinedAt - Return both the Scope and the InlinedAt values. | |
MDNode * | getScopeNode (const LLVMContext &Ctx) const |
getScopeNode - Get MDNode for DebugLoc's scope, or null if invalid. | |
DebugLoc | getFnDebugLoc (const LLVMContext &Ctx) const |
MDNode * | getAsMDNode (const LLVMContext &Ctx) const |
bool | operator== (const DebugLoc &DL) const |
bool | operator!= (const DebugLoc &DL) const |
void | dump (const LLVMContext &Ctx) const |
void | print (const LLVMContext &Ctx, raw_ostream &OS) const |
prints source location /path/to/file.exe:line:col @[inlined at] | |
Static Public Member Functions | |
static DebugLoc | get (unsigned Line, unsigned Col, MDNode *Scope, MDNode *InlinedAt=nullptr) |
static DebugLoc | getFromDILocation (MDNode *N) |
getFromDILocation - Translate the DILocation quad into a DebugLoc. | |
static DebugLoc | getFromDILexicalBlock (MDNode *N) |
getFromDILexicalBlock - Translate the DILexicalBlock into a DebugLoc. | |
Friends | |
struct | DenseMapInfo< DebugLoc > |
DebugLoc - Debug location id. This is carried by Instruction, SDNode, and MachineInstr to compactly encode file/line/scope information for an operation.
Definition at line 29 of file DebugLoc.h.
llvm::DebugLoc::DebugLoc | ( | ) | [inline] |
Definition at line 57 of file DebugLoc.h.
Referenced by getFnDebugLoc(), getFromDILexicalBlock(), and getFromDILocation().
void DebugLoc::dump | ( | const LLVMContext & | Ctx | ) | const |
Definition at line 154 of file DebugLoc.cpp.
References llvm::dbgs(), dump(), getCol(), getFromDILocation(), getInlinedAt(), getLine(), and isUnknown().
Referenced by dump().
DebugLoc DebugLoc::get | ( | unsigned | Line, |
unsigned | Col, | ||
MDNode * | Scope, | ||
MDNode * | InlinedAt = nullptr |
||
) | [static] |
get - Get a new DebugLoc that corresponds to the specified line/col scope/inline location.
Definition at line 94 of file DebugLoc.cpp.
References llvm::Value::getContext(), llvm::LLVMContextImpl::getOrAddScopeInlinedAtIdxEntry(), llvm::LLVMContextImpl::getOrAddScopeRecordIdxEntry(), and llvm::LLVMContext::pImpl.
Referenced by llvm::MipsSEFrameLowering::emitEpilogue(), llvm::MSP430FrameLowering::emitEpilogue(), llvm::PPCFrameLowering::emitEpilogue(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::MSP430FrameLowering::emitPrologue(), llvm::SystemZFrameLowering::emitPrologue(), getAsMDNode(), getFnDebugLoc(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), and updateInlinedAtInfo().
MDNode * DebugLoc::getAsMDNode | ( | const LLVMContext & | Ctx | ) | const |
getAsMDNode - This method converts the compressed DebugLoc node into a DILocation compatible MDNode.
getAsMDNode - This method converts the compressed DebugLoc node into a DILocation-compatible MDNode.
Definition at line 120 of file DebugLoc.cpp.
References get(), getCol(), llvm::Value::getContext(), llvm::Type::getInt32Ty(), getLine(), getScopeAndInlinedAt(), and isUnknown().
Referenced by updateInlinedAtInfo().
unsigned llvm::DebugLoc::getCol | ( | ) | const [inline] |
Definition at line 77 of file DebugLoc.h.
Referenced by llvm::DwarfDebug::beginFunction(), llvm::DwarfDebug::beginInstruction(), dump(), llvm::NVPTXAsmPrinter::emitLineNumberAsDotLoc(), getAsMDNode(), print(), printDebugLoc(), updateInlinedAtInfo(), and WriteFunction().
DebugLoc DebugLoc::getFnDebugLoc | ( | const LLVMContext & | Ctx | ) | const |
Definition at line 79 of file DebugLoc.cpp.
References DebugLoc(), get(), llvm::getDISubprogram(), llvm::DISubprogram::getLineNumber(), llvm::DISubprogram::getScopeLineNumber(), getScopeNode(), and llvm::DIDescriptor::isSubprogram().
Referenced by llvm::WinCodeViewLineTables::beginFunction(), and llvm::DwarfDebug::beginFunction().
DebugLoc DebugLoc::getFromDILexicalBlock | ( | MDNode * | N | ) | [static] |
getFromDILexicalBlock - Translate the DILexicalBlock into a DebugLoc.
Definition at line 146 of file DebugLoc.cpp.
References DebugLoc(), llvm::DILexicalBlock::getColumnNumber(), llvm::DILexicalBlock::getContext(), and llvm::DILexicalBlock::getLineNumber().
DebugLoc DebugLoc::getFromDILocation | ( | MDNode * | N | ) | [static] |
getFromDILocation - Translate the DILocation quad into a DebugLoc.
Definition at line 137 of file DebugLoc.cpp.
References DebugLoc(), llvm::DILocation::getColumnNumber(), llvm::DILocation::getLineNumber(), llvm::DILocation::getOrigLocation(), and llvm::DILocation::getScope().
Referenced by dump(), getScopeNode(), LLVMSetCurrentDebugLocation(), print(), llvm::MachineInstr::print(), printDebugLoc(), llvm::DIVariable::printExtendedName(), llvm::Instruction::setMetadata(), and updateInlinedAtInfo().
MDNode * DebugLoc::getInlinedAt | ( | const LLVMContext & | Ctx | ) | const |
getInlinedAt - This returns the InlinedAt pointer for this DebugLoc, or null if invalid or not present.
Definition at line 37 of file DebugLoc.cpp.
References llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::ScopeInlinedAtRecords.
Referenced by dump(), getScopeNode(), print(), printDebugLoc(), and updateInlinedAtInfo().
unsigned llvm::DebugLoc::getLine | ( | ) | const [inline] |
Definition at line 73 of file DebugLoc.h.
Referenced by llvm::DwarfDebug::beginFunction(), llvm::DwarfDebug::beginInstruction(), dump(), llvm::NVPTXAsmPrinter::emitLineNumberAsDotLoc(), functionHasLines(), getAsMDNode(), print(), printDebugLoc(), updateInlinedAtInfo(), and WriteFunction().
MDNode * DebugLoc::getScope | ( | const LLVMContext & | Ctx | ) | const |
getScope - This returns the scope pointer for this DebugLoc, or null if invalid.
Definition at line 20 of file DebugLoc.cpp.
References llvm::LLVMContext::pImpl, llvm::LLVMContextImpl::ScopeInlinedAtRecords, and llvm::LLVMContextImpl::ScopeRecords.
Referenced by llvm::DwarfDebug::beginFunction(), llvm::DwarfDebug::beginInstruction(), llvm::NVPTXAsmPrinter::emitLineNumberAsDotLoc(), getScopeNode(), print(), printDebugLoc(), and updateInlinedAtInfo().
void DebugLoc::getScopeAndInlinedAt | ( | MDNode *& | Scope, |
MDNode *& | IA, | ||
const LLVMContext & | Ctx | ||
) | const |
getScopeAndInlinedAt - Return both the Scope and the InlinedAt values.
Return both the Scope and the InlinedAt values.
Definition at line 49 of file DebugLoc.cpp.
References llvm::LLVMContext::pImpl, llvm::LLVMContextImpl::ScopeInlinedAtRecords, and llvm::LLVMContextImpl::ScopeRecords.
Referenced by llvm::LexicalScopes::findInlinedScope(), llvm::LexicalScopes::findLexicalScope(), getAsMDNode(), and WriteFunction().
MDNode * DebugLoc::getScopeNode | ( | const LLVMContext & | Ctx | ) | const |
getScopeNode - Get MDNode for DebugLoc's scope, or null if invalid.
Definition at line 73 of file DebugLoc.cpp.
References getFromDILocation(), getInlinedAt(), getScope(), and getScopeNode().
Referenced by getFnDebugLoc(), and getScopeNode().
bool llvm::DebugLoc::isUnknown | ( | ) | const [inline] |
isUnknown - Return true if this is an unknown location.
Definition at line 71 of file DebugLoc.h.
Referenced by llvm::WinCodeViewLineTables::beginFunction(), llvm::DwarfDebug::beginFunction(), llvm::WinCodeViewLineTables::beginInstruction(), llvm::DwarfDebug::beginInstruction(), llvm::LexicalScopes::dominates(), llvm::InstCombiner::DoOneIteration(), dump(), llvm::NVPTXAsmPrinter::emitLineNumberAsDotLoc(), findPrologueEndLoc(), fixupLineNumbers(), functionHasLines(), getAsMDNode(), llvm::Loop::getStartLoc(), llvm::Instruction::hasMetadata(), llvm::MachineInstr::isIdenticalTo(), llvm::DiagnosticInfoOptimizationBase::isLocationAvailable(), print(), llvm::MachineInstr::print(), printDebugLoc(), llvm::DIVariable::printExtendedName(), llvm::IRBuilderBase::SetInstDebugLocation(), and WriteFunction().
Definition at line 107 of file DebugLoc.h.
Definition at line 104 of file DebugLoc.h.
void DebugLoc::print | ( | const LLVMContext & | Ctx, |
raw_ostream & | OS | ||
) | const |
prints source location /path/to/file.exe:line:col @[inlined at]
Definition at line 170 of file DebugLoc.cpp.
References getCol(), llvm::DIScope::getFilename(), getFromDILocation(), getInlinedAt(), getLine(), getScope(), llvm::DIDescriptor::isScope(), isUnknown(), and print().
Referenced by print(), and printDebugLoc().
friend struct DenseMapInfo< DebugLoc > [friend] |
Definition at line 30 of file DebugLoc.h.