LLVM API Documentation

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

#include <DebugLoc.h>

List of all members.

Public Member Functions

 DebugLoc ()
 DebugLoc (DebugLoc &&X)
 DebugLoc (const DebugLoc &X)
DebugLocoperator= (DebugLoc &&X)
DebugLocoperator= (const DebugLoc &X)
bool hasTrivialDestructor () const
 Check whether this has a trivial destructor.
bool isUnknown () const
 isUnknown - Return true if this is an unknown location.
unsigned getLine () const
unsigned getCol () const
MDNodegetScope () const
MDNodegetScope (const LLVMContext &) const
MDNodegetInlinedAt () const
MDNodegetInlinedAt (const LLVMContext &) const
void getScopeAndInlinedAt (MDNode *&Scope, MDNode *&IA) const
 getScopeAndInlinedAt - Return both the Scope and the InlinedAt values.
void getScopeAndInlinedAt (MDNode *&Scope, MDNode *&IA, const LLVMContext &) const
MDNodegetScopeNode () const
 getScopeNode - Get MDNode for DebugLoc's scope, or null if invalid.
MDNodegetScopeNode (const LLVMContext &) const
DebugLoc getFnDebugLoc () const
DebugLoc getFnDebugLoc (const LLVMContext &) const
MDNodegetAsMDNode () const
MDNodegetAsMDNode (LLVMContext &) const
bool operator== (const DebugLoc &DL) const
bool operator!= (const DebugLoc &DL) const
void dump () const
void dump (const LLVMContext &) const
void print (raw_ostream &OS) const
 prints source location /path/to/file.exe:line:col @[inlined at]
void print (const LLVMContext &, raw_ostream &OS) const

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.

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

Constructor & Destructor Documentation

Definition at line 34 of file DebugLoc.h.

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

llvm::DebugLoc::DebugLoc ( DebugLoc &&  X) [inline]

Definition at line 35 of file DebugLoc.h.

Definition at line 36 of file DebugLoc.h.

Member Function Documentation

void DebugLoc::dump ( ) const

Definition at line 80 of file DebugLoc.cpp.

References llvm::dbgs(), dump(), getCol(), getFromDILocation(), getInlinedAt(), getLine(), and isUnknown().

Referenced by dump().

void llvm::DebugLoc::dump ( const LLVMContext ) const [inline]

Definition at line 103 of file DebugLoc.h.

References dump().

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 62 of file DebugLoc.cpp.

Referenced by fixupLineNumbers().

Definition at line 97 of file DebugLoc.h.

References getAsMDNode().

Referenced by getAsMDNode().

Definition at line 90 of file DebugLoc.h.

References getFnDebugLoc().

getInlinedAt - This returns the InlinedAt pointer for this DebugLoc, or null if invalid or not present.

Definition at line 25 of file DebugLoc.cpp.

References llvm::DILocation::getOrigLocation().

Referenced by dump(), getScopeAndInlinedAt(), getScopeNode(), print(), printDebugLoc(), updateInlinedAtInfo(), and llvm::DISubprogram::Verify().

Definition at line 74 of file DebugLoc.h.

References getInlinedAt().

Referenced by getInlinedAt().

Definition at line 69 of file DebugLoc.h.

References getScope().

Referenced by getScope().

void DebugLoc::getScopeAndInlinedAt ( MDNode *&  Scope,
MDNode *&  IA 
) const

getScopeAndInlinedAt - Return both the Scope and the InlinedAt values.

Return both the Scope and the InlinedAt values.

Definition at line 30 of file DebugLoc.cpp.

References getInlinedAt(), and getScope().

Referenced by llvm::LexicalScopes::findInlinedScope(), llvm::LexicalScopes::findLexicalScope(), getScopeAndInlinedAt(), llvm::DISubprogram::Verify(), and WriteFunction().

void llvm::DebugLoc::getScopeAndInlinedAt ( MDNode *&  Scope,
MDNode *&  IA,
const LLVMContext  
) const [inline]

Definition at line 78 of file DebugLoc.h.

References getScopeAndInlinedAt().

getScopeNode - Get MDNode for DebugLoc's scope, or null if invalid.

Definition at line 35 of file DebugLoc.cpp.

References getFromDILocation(), getInlinedAt(), getScope(), and getScopeNode().

Referenced by llvm::getDISubprogram(), getFnDebugLoc(), and getScopeNode().

Definition at line 85 of file DebugLoc.h.

References getScopeNode().

Referenced by getScopeNode().

Check whether this has a trivial destructor.

Definition at line 47 of file DebugLoc.h.

References llvm::TypedTrackingMDRef< T >::hasTrivialDestructor().

Referenced by llvm::SDNode::SDNode(), and llvm::MachineInstr::setDebugLoc().

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

Definition at line 100 of file DebugLoc.h.

DebugLoc& llvm::DebugLoc::operator= ( DebugLoc &&  X) [inline]

Definition at line 37 of file DebugLoc.h.

References llvm::X.

DebugLoc& llvm::DebugLoc::operator= ( const DebugLoc X) [inline]

Definition at line 41 of file DebugLoc.h.

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

Definition at line 99 of file DebugLoc.h.

void DebugLoc::print ( raw_ostream OS) const

prints source location /path/to/file.exe:line:col @[inlined at]

Definition at line 96 of file DebugLoc.cpp.

References getCol(), llvm::DIScope::getFilename(), getFromDILocation(), getInlinedAt(), getLine(), getScope(), llvm::DIDescriptor::isScope(), isUnknown(), and print().

Referenced by print(), and printDebugLoc().

void llvm::DebugLoc::print ( const LLVMContext ,
raw_ostream OS 
) const [inline]

Definition at line 106 of file DebugLoc.h.

References print().

Referenced by print().

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