LLVM API Documentation
#include <DebugLoc.h>
Public Member Functions | |
DebugLoc () | |
bool | isUnknown () const |
isUnknown - Return true if this is an unknown location. More... | |
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. More... | |
MDNode * | getAsMDNode (const LLVMContext &Ctx) const |
bool | operator== (const DebugLoc &DL) const |
bool | operator!= (const DebugLoc &DL) const |
void | dump (const LLVMContext &Ctx) const |
Static Public Member Functions | |
static DebugLoc | get (unsigned Line, unsigned Col, MDNode *Scope, MDNode *InlinedAt=0) |
static DebugLoc | getFromDILocation (MDNode *N) |
getFromDILocation - Translate the DILocation quad into a DebugLoc. More... | |
static DebugLoc | getFromDILexicalBlock (MDNode *N) |
getFromDILexicalBlock - Translate the DILexicalBlock into a DebugLoc. More... | |
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 28 of file DebugLoc.h.
|
inline |
Definition at line 56 of file DebugLoc.h.
Referenced by getFromDILexicalBlock(), and getFromDILocation().
void DebugLoc::dump | ( | const LLVMContext & | Ctx | ) | const |
Definition at line 133 of file DebugLoc.cpp.
References llvm::dbgs(), dump(), getCol(), getFromDILocation(), getInlinedAt(), getLine(), and isUnknown().
Referenced by dump().
|
static |
get - Get a new DebugLoc that corresponds to the specified line/col scope/inline location.
Definition at line 74 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(), 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.
Definition at line 100 of file DebugLoc.cpp.
References llvm::ConstantInt::get(), llvm::MDNode::get(), getCol(), llvm::Value::getContext(), llvm::Type::getInt32Ty(), getLine(), getScopeAndInlinedAt(), and isUnknown().
Referenced by updateInlinedAtInfo().
|
inline |
Definition at line 76 of file DebugLoc.h.
Referenced by llvm::DwarfDebug::beginFunction(), llvm::DwarfDebug::beginInstruction(), dump(), llvm::NVPTXAsmPrinter::emitLineNumberAsDotLoc(), getAsMDNode(), printDebugLoc(), updateInlinedAtInfo(), and WriteFunction().
getFromDILexicalBlock - Translate the DILexicalBlock into a DebugLoc.
Definition at line 126 of file DebugLoc.cpp.
References DebugLoc(), llvm::DILexicalBlock::getColumnNumber(), llvm::DILexicalBlock::getContext(), and llvm::DILexicalBlock::getLineNumber().
getFromDILocation - Translate the DILocation quad into a DebugLoc.
Definition at line 117 of file DebugLoc.cpp.
References DebugLoc(), llvm::DILocation::getColumnNumber(), llvm::DILocation::getLineNumber(), llvm::DILocation::getOrigLocation(), and llvm::DILocation::getScope().
Referenced by dump(), llvm::LexicalScopes::findLexicalScope(), getScopeNode(), LLVMSetCurrentDebugLocation(), 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(), printDebugLoc(), and updateInlinedAtInfo().
|
inline |
Definition at line 72 of file DebugLoc.h.
Referenced by llvm::DwarfDebug::beginFunction(), llvm::DwarfDebug::beginInstruction(), dump(), llvm::NVPTXAsmPrinter::emitLineNumberAsDotLoc(), getAsMDNode(), 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(), 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::findLexicalScope(), getAsMDNode(), and WriteFunction().
|
inline |
isUnknown - Return true if this is an unknown location.
Definition at line 70 of file DebugLoc.h.
Referenced by llvm::DwarfDebug::beginFunction(), llvm::DwarfDebug::beginInstruction(), llvm::ConvertDebugDeclareToDebugValue(), llvm::LexicalScopes::dominates(), llvm::InstCombiner::DoOneIteration(), dump(), llvm::NVPTXAsmPrinter::emitLineNumberAsDotLoc(), fixupLineNumbers(), getAsMDNode(), llvm::Instruction::hasMetadata(), llvm::MachineInstr::isIdenticalTo(), llvm::MachineInstr::print(), printDebugLoc(), llvm::DIVariable::printExtendedName(), llvm::IRBuilderBase::SetInstDebugLocation(), and WriteFunction().
Definition at line 100 of file DebugLoc.h.
Definition at line 97 of file DebugLoc.h.
|
friend |
Definition at line 29 of file DebugLoc.h.