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 * | 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. | |
| 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 26 of file DebugLoc.h.
| llvm::DebugLoc::DebugLoc | ( | ) | [inline] |
Definition at line 54 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().
| DebugLoc DebugLoc::get | ( | unsigned | Line, |
| unsigned | Col, | ||
| MDNode * | Scope, | ||
| MDNode * | InlinedAt = 0 |
||
| ) | [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::MSP430FrameLowering::emitEpilogue(), llvm::MBlazeFrameLowering::emitEpilogue(), llvm::PPCFrameLowering::emitEpilogue(), llvm::MSP430FrameLowering::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.
Definition at line 100 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 74 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().
| unsigned llvm::DebugLoc::getLine | ( | ) | const [inline] |
Definition at line 70 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().
| bool llvm::DebugLoc::isUnknown | ( | ) | const [inline] |
isUnknown - Return true if this is an unknown location.
Definition at line 68 of file DebugLoc.h.
Referenced by llvm::DwarfDebug::beginFunction(), llvm::DwarfDebug::beginInstruction(), llvm::ConvertDebugDeclareToDebugValue(), llvm::LexicalScopes::dominates(), llvm::InstCombiner::DoOneIteration(), dump(), llvm::NVPTXAsmPrinter::emitLineNumberAsDotLoc(), llvm::IRBuilderBase::EnableDebugLocations(), fixupLineNumbers(), getAsMDNode(), llvm::Instruction::hasMetadata(), llvm::MachineInstr::isIdenticalTo(), llvm::MachineInstr::print(), printDebugLoc(), llvm::DIVariable::printExtendedName(), llvm::IRBuilderBase::SetInstDebugLocation(), and WriteFunction().
Definition at line 98 of file DebugLoc.h.
Definition at line 95 of file DebugLoc.h.
friend struct DenseMapInfo< DebugLoc > [friend] |
Definition at line 27 of file DebugLoc.h.