LLVM 19.0.0git
Public Member Functions | Static Public Member Functions | List of all members
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:
Inheritance graph
[legend]

Public Member Functions

 DbgLabelRecord (DILabel *Label, DebugLoc DL)
 
DbgLabelRecordclone () const
 
void print (raw_ostream &O, bool IsForDebug=false) const
 
void print (raw_ostream &ROS, ModuleSlotTracker &MST, bool IsForDebug) const
 
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)
 
bool isEquivalentTo (const DbgRecord &R) const
 Same as isIdenticalToWhenDefined but checks DebugLoc too.
 
Kind getRecordKind () const
 
void setMarker (DbgMarker *M)
 
DbgMarkergetMarker ()
 
const DbgMarkergetMarker () const
 
BasicBlockgetBlock ()
 
const BasicBlockgetBlock () const
 
FunctiongetFunction ()
 
const FunctiongetFunction () const
 
ModulegetModule ()
 
const ModulegetModule () const
 
LLVMContextgetContext ()
 
const LLVMContextgetContext () const
 
const InstructiongetInstruction () const
 
const BasicBlockgetParent () const
 
BasicBlockgetParent ()
 
void removeFromParent ()
 
void eraseFromParent ()
 
DbgRecordgetNextNode ()
 
DbgRecordgetPrevNode ()
 
void insertBefore (DbgRecord *InsertBefore)
 
void insertAfter (DbgRecord *InsertAfter)
 
void moveBefore (DbgRecord *MoveBefore)
 
void moveAfter (DbgRecord *MoveAfter)
 
DebugLoc getDebugLoc () const
 
void setDebugLoc (DebugLoc Loc)
 
void dump () const
 
void deleteRecord ()
 Methods that dispatch to subclass implementations.
 
DbgRecordclone () const
 
void print (raw_ostream &O, bool IsForDebug=false) const
 
void print (raw_ostream &O, ModuleSlotTracker &MST, bool IsForDebug) const
 
bool isIdenticalToWhenDefined (const DbgRecord &R) const
 
DbgInfoIntrinsiccreateDebugIntrinsic (Module *M, Instruction *InsertBefore) const
 Convert this DbgRecord back into an appropriate llvm.dbg.
 
- Public Member Functions inherited from llvm::ilist_node_impl< OptionsT >
self_iterator getIterator ()
 
const_self_iterator getIterator () const
 
reverse_self_iterator getReverseIterator ()
 
const_reverse_self_iterator getReverseIterator () const
 
bool isSentinel () const
 Check whether this is the sentinel node.
 

Static Public Member Functions

static 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< OptionsT >
using self_iterator = typename ilist_select_iterator_type< OptionsT::has_iterator_bits, OptionsT, false, false >::type
 
using const_self_iterator = typename ilist_select_iterator_type< OptionsT::has_iterator_bits, OptionsT, false, true >::type
 
using reverse_self_iterator = typename ilist_select_iterator_type< OptionsT::has_iterator_bits, OptionsT, true, false >::type
 
using const_reverse_self_iterator = typename ilist_select_iterator_type< OptionsT::has_iterator_bits, OptionsT, true, true >::type
 
- 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< OptionsT >
 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 223 of file DebugProgramInstruction.h.

Constructor & Destructor Documentation

◆ DbgLabelRecord()

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

Definition at line 151 of file DebugProgramInstruction.cpp.

References assert().

Member Function Documentation

◆ classof()

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

Support type inquiry through isa, cast, and dyn_cast.

Definition at line 252 of file DebugProgramInstruction.h.

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

◆ clone()

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

Definition at line 394 of file DebugProgramInstruction.cpp.

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

◆ createDebugIntrinsic()

DbgLabelInst * llvm::DbgLabelRecord::createDebugIntrinsic ( Module M,
Instruction InsertBefore 
) const

◆ 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 156 of file DebugProgramInstruction.cpp.

References DL.

◆ getLabel()

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

Definition at line 248 of file DebugProgramInstruction.h.

Referenced by clone(), and createDebugIntrinsic().

◆ getRawLabel()

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

Definition at line 249 of file DebugProgramInstruction.h.

◆ print() [1/2]

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

Definition at line 4957 of file AsmWriter.cpp.

References getModuleFromDPI(), and print().

Referenced by 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 247 of file DebugProgramInstruction.h.


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