LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Friends | List of all members
llvm::DebugLoc Class Reference

#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
 
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. More...
 
MDNodegetAsMDNode (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 >
 

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 28 of file DebugLoc.h.

Constructor & Destructor Documentation

llvm::DebugLoc::DebugLoc ( )
inline

Definition at line 56 of file DebugLoc.h.

Referenced by getFromDILexicalBlock(), and getFromDILocation().

Member Function Documentation

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

unsigned llvm::DebugLoc::getCol ( ) const
inline
DebugLoc DebugLoc::getFromDILexicalBlock ( MDNode N)
static
DebugLoc DebugLoc::getFromDILocation ( MDNode N)
static
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
MDNode * DebugLoc::getScope ( const LLVMContext Ctx) const
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
bool llvm::DebugLoc::operator!= ( const DebugLoc DL) const
inline

Definition at line 100 of file DebugLoc.h.

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

Definition at line 97 of file DebugLoc.h.

Friends And Related Function Documentation

friend struct DenseMapInfo< DebugLoc >
friend

Definition at line 29 of file DebugLoc.h.


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