LLVM API Documentation

Public Member Functions | Static Public Member Functions | Friends
llvm::DebugLoc Class Reference

#include <DebugLoc.h>

List of all members.

Public Member Functions

 DebugLoc ()
bool isUnknown () const
 isUnknown - Return true if this is an unknown location.
unsigned getLine () const
unsigned getCol () const
MDNodegetScope (const LLVMContext &Ctx) const
MDNodegetInlinedAt (const LLVMContext &Ctx) const
void getScopeAndInlinedAt (MDNode *&Scope, MDNode *&IA, const LLVMContext &Ctx) const
 getScopeAndInlinedAt - Return both the Scope and the InlinedAt values.
MDNodegetScopeNode (const LLVMContext &Ctx) const
 getScopeNode - Get MDNode for DebugLoc's scope, or null if invalid.
DebugLoc getFnDebugLoc (const LLVMContext &Ctx) const
MDNodegetAsMDNode (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.


struct DenseMapInfo< DebugLoc >

Detailed Description

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.

Constructor & Destructor Documentation

Definition at line 57 of file DebugLoc.h.

Referenced by getFnDebugLoc(), getFromDILexicalBlock(), and getFromDILocation().

Member Function Documentation

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]

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]

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]
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().

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]
bool llvm::DebugLoc::operator!= ( const DebugLoc DL) const [inline]

Definition at line 107 of file DebugLoc.h.

bool llvm::DebugLoc::operator== ( const DebugLoc DL) const [inline]

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().

Friends And Related Function Documentation

friend struct DenseMapInfo< DebugLoc > [friend]

Definition at line 30 of file DebugLoc.h.

The documentation for this class was generated from the following files: