LLVM 22.0.0git
llvm::DbgLabelRecord Class Reference

Records a position in IR for a source label (DILabel). More...

#include "llvm/IR/DebugProgramInstruction.h"

Inheritance diagram for llvm::DbgLabelRecord:
[legend]

Public Member Functions

LLVM_ABI DbgLabelRecord (DILabel *Label, DebugLoc DL)
LLVM_ABI DbgLabelRecordclone () const
LLVM_ABI void print (raw_ostream &O, bool IsForDebug=false) const
LLVM_ABI void print (raw_ostream &ROS, ModuleSlotTracker &MST, bool IsForDebug) const
LLVM_ABI DbgLabelInstcreateDebugIntrinsic (Module *M, Instruction *InsertBefore) const
void setLabel (DILabel *NewLabel)
DILabelgetLabel () const
MDNodegetRawLabel () const
Public Member Functions inherited from llvm::DbgRecord
 DbgRecord (Kind RecordKind, DebugLoc DL)
LLVM_ABI bool isEquivalentTo (const DbgRecord &R) const
 Same as isIdenticalToWhenDefined but checks DebugLoc too.
Kind getRecordKind () const
void setMarker (DbgMarker *M)
DbgMarkergetMarker ()
const DbgMarkergetMarker () const
LLVM_ABI BasicBlockgetBlock ()
LLVM_ABI const BasicBlockgetBlock () const
LLVM_ABI FunctiongetFunction ()
LLVM_ABI const FunctiongetFunction () const
LLVM_ABI ModulegetModule ()
LLVM_ABI const ModulegetModule () const
LLVM_ABI LLVMContextgetContext ()
LLVM_ABI const LLVMContextgetContext () const
LLVM_ABI const InstructiongetInstruction () const
LLVM_ABI const BasicBlockgetParent () const
LLVM_ABI BasicBlockgetParent ()
LLVM_ABI void removeFromParent ()
LLVM_ABI void eraseFromParent ()
DbgRecordgetNextNode ()
DbgRecordgetPrevNode ()
LLVM_ABI void insertBefore (DbgRecord *InsertBefore)
LLVM_ABI void insertAfter (DbgRecord *InsertAfter)
LLVM_ABI void moveBefore (DbgRecord *MoveBefore)
LLVM_ABI void moveAfter (DbgRecord *MoveAfter)
LLVM_ABI void insertBefore (self_iterator InsertBefore)
LLVM_ABI void insertAfter (self_iterator InsertAfter)
LLVM_ABI void moveBefore (self_iterator MoveBefore)
LLVM_ABI void moveAfter (self_iterator MoveAfter)
DebugLoc getDebugLoc () const
void setDebugLoc (DebugLoc Loc)
LLVM_ABI void dump () const
LLVM_ABI void deleteRecord ()
 Methods that dispatch to subclass implementations.
LLVM_ABI DbgRecordclone () const
LLVM_ABI void print (raw_ostream &O, bool IsForDebug=false) const
LLVM_ABI void print (raw_ostream &O, ModuleSlotTracker &MST, bool IsForDebug) const
LLVM_ABI bool isIdenticalToWhenDefined (const DbgRecord &R) const
LLVM_ABI DbgInfoIntrinsiccreateDebugIntrinsic (Module *M, Instruction *InsertBefore) const
 Convert this DbgRecord back into an appropriate llvm.dbg.
Public Member Functions inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< DbgRecord, Options... >::type >
self_iterator getIterator ()
reverse_self_iterator getReverseIterator ()
std::enable_if_t< T::is_sentinel_tracking_explicit, boolisSentinel () const
 Check whether this is the sentinel node.
Public Member Functions inherited from llvm::ilist_detail::node_parent_access< ilist_node_impl< ilist_detail::compute_node_options< DbgRecord, Options... >::type >, ilist_detail::compute_node_options< DbgRecord, Options... >::type::parent_ty >
const ilist_detail::compute_node_options< DbgRecord, Options... >::type::parent_ty * getParent () const
void setParent (ilist_detail::compute_node_options< DbgRecord, Options... >::type::parent_ty *Parent)

Static Public Member Functions

static LLVM_ABI DbgLabelRecordcreateUnresolvedDbgLabelRecord (MDNode *Label, MDNode *DL)
 For use during parsing; creates a DbgLabelRecord from as-of-yet unresolved MDNodes.
static bool classof (const DbgRecord *E)
 Support type inquiry through isa, cast, and dyn_cast.

Additional Inherited Members

Public Types inherited from llvm::DbgRecord
enum  Kind : uint8_t { ValueKind , LabelKind }
 Subclass discriminator. More...
using self_iterator = simple_ilist<DbgRecord>::iterator
using const_self_iterator = simple_ilist<DbgRecord>::const_iterator
Public Attributes inherited from llvm::DbgRecord
DbgMarkerMarker = nullptr
 Marker that this DbgRecord is linked into.
Protected Types inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< DbgRecord, Options... >::type >
using self_iterator
using const_self_iterator
using reverse_self_iterator
using const_reverse_self_iterator
Protected Member Functions inherited from llvm::DbgRecord
 ~DbgRecord ()=default
 Similarly to Value, we avoid paying the cost of a vtable by protecting the dtor and having deleteRecord dispatch cleanup.
Protected Member Functions inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< DbgRecord, Options... >::type >
 ilist_node_impl ()=default
Protected Attributes inherited from llvm::DbgRecord
DebugLoc DbgLoc
Kind RecordKind
 Subclass discriminator.

Detailed Description

Records a position in IR for a source label (DILabel).

Corresponds to the llvm.dbg.label intrinsic.

Definition at line 237 of file DebugProgramInstruction.h.

Constructor & Destructor Documentation

◆ DbgLabelRecord()

llvm::DbgLabelRecord::DbgLabelRecord ( DILabel * Label,
DebugLoc DL )

Member Function Documentation

◆ classof()

bool llvm::DbgLabelRecord::classof ( const DbgRecord * E)
inlinestatic

Support type inquiry through isa, cast, and dyn_cast.

Definition at line 267 of file DebugProgramInstruction.h.

References llvm::DbgRecord::DbgRecord(), E(), and llvm::DbgRecord::LabelKind.

◆ clone()

DbgLabelRecord * llvm::DbgLabelRecord::clone ( ) const

Definition at line 399 of file DebugProgramInstruction.cpp.

References llvm::DbgRecord::getDebugLoc(), and getLabel().

◆ createDebugIntrinsic()

◆ createUnresolvedDbgLabelRecord()

DbgLabelRecord * llvm::DbgLabelRecord::createUnresolvedDbgLabelRecord ( MDNode * Label,
MDNode * DL )
static

For use during parsing; creates a DbgLabelRecord from as-of-yet unresolved MDNodes.

Trying to access the resulting DbgLabelRecord's fields before they are resolved, or if they resolve to the wrong type, will result in a crash.

Definition at line 157 of file DebugProgramInstruction.cpp.

References DL.

Referenced by upgradeDbgIntrinsicToDbgRecord().

◆ getLabel()

DILabel * llvm::DbgLabelRecord::getLabel ( ) const
inline

Definition at line 263 of file DebugProgramInstruction.h.

References llvm::MDNode::get().

Referenced by clone(), and createDebugIntrinsic().

◆ getRawLabel()

MDNode * llvm::DbgLabelRecord::getRawLabel ( ) const
inline

Definition at line 264 of file DebugProgramInstruction.h.

◆ print() [1/2]

void DbgLabelRecord::print ( raw_ostream & O,
bool IsForDebug = false ) const

Definition at line 5185 of file AsmWriter.cpp.

References getModuleFromDPI(), and print().

◆ print() [2/2]

void DbgLabelRecord::print ( raw_ostream & ROS,
ModuleSlotTracker & MST,
bool IsForDebug ) const

◆ setLabel()

void llvm::DbgLabelRecord::setLabel ( DILabel * NewLabel)
inline

Definition at line 262 of file DebugProgramInstruction.h.


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