LLVM: llvm::DbgMarker Class Reference (original) (raw)

Per-instruction record of debug-info. More...

#include "[llvm/IR/DebugProgramInstruction.h](DebugProgramInstruction%5F8h%5Fsource.html)"

Public Member Functions
DbgMarker ()=default
bool empty () const
LLVM_ABI const BasicBlock * getParent () const
LLVM_ABI BasicBlock * getParent ()
LLVM_ABI void removeMarker ()
Handle the removal of a marker: the position of debug-info has gone away, but the stored debug records should not.
LLVM_ABI void dump () const
LLVM_ABI void removeFromParent ()
LLVM_ABI void eraseFromParent ()
LLVM_ABI void print (raw_ostream &O, bool IsForDebug=false) const
Implement operator<< on DbgMarker.
LLVM_ABI void print (raw_ostream &ROS, ModuleSlotTracker &MST, bool IsForDebug) const
LLVM_ABI iterator_range< simple_ilist< DbgRecord >::iterator > getDbgRecordRange ()
Produce a range over all the DbgRecords in this Marker.
LLVM_ABI iterator_range< simple_ilist< DbgRecord >::const_iterator > getDbgRecordRange () const
LLVM_ABI void absorbDebugValues (DbgMarker &Src, bool InsertAtHead)
Transfer any DbgRecords from Src into this DbgMarker.
LLVM_ABI void absorbDebugValues (iterator_range< DbgRecord::self_iterator > Range, DbgMarker &Src, bool InsertAtHead)
Transfer the DbgRecords in Range from Src into this DbgMarker.
LLVM_ABI void insertDbgRecord (DbgRecord *New, bool InsertAtHead)
Insert a DbgRecord into this DbgMarker, at the end of the list.
LLVM_ABI void insertDbgRecord (DbgRecord *New, DbgRecord *InsertBefore)
Insert a DbgRecord prior to a DbgRecord contained within this marker.
LLVM_ABI void insertDbgRecordAfter (DbgRecord *New, DbgRecord *InsertAfter)
Insert a DbgRecord after a DbgRecord contained within this marker.
LLVM_ABI iterator_range< simple_ilist< DbgRecord >::iterator > cloneDebugInfoFrom (DbgMarker *From, std::optional< simple_ilist< DbgRecord >::iterator > FromHere, bool InsertAtHead=false)
Clone all DbgMarkers from From into this marker.
LLVM_ABI void dropDbgRecords ()
Erase all DbgRecords in this DbgMarker.
LLVM_ABI void dropOneDbgRecord (DbgRecord *DR)
Erase a single DbgRecord from this marker.
Static Public Attributes
static LLVM_ABI DbgMarker EmptyDbgMarker
We generally act like all llvm Instructions have a range of DbgRecords attached to them, but in reality sometimes we don't allocate the DbgMarker to save time and memory, but still have to return ranges of DbgRecords.

Per-instruction record of debug-info.

If an Instruction is the position of some debugging information, it points at a DbgMarker storing that info. Each marker points back at the instruction that owns it. Various utilities are provided for manipulating the DbgRecords contained within this marker.

This class has a rough surface area, because it's needed to preserve the one arefact that we can't yet eliminate from the intrinsic / dbg.value debug-info design: the order of records is significant, and duplicates can exist. Thus, if one has a run of debug-info records such as: dbg.value(... foo = barinst dbg.value(... and remove barinst, then the dbg.values must be preserved in the correct order. Hence, the use of iterators to select positions to insert things into, or the occasional InsertAtHead parameter indicating that new records should go at the start of the list.

There are only five or six places in LLVM that truly rely on this ordering, which we can improve in the future. Additionally, many improvements in the way that debug-info is stored can be achieved in this class, at a future date.

Definition at line 603 of file DebugProgramInstruction.h.

llvm::DbgMarker::DbgMarker ( ) default

absorbDebugValues() [1/2]

void DbgMarker::absorbDebugValues ( DbgMarker & Src,
bool InsertAtHead )

absorbDebugValues() [2/2]

cloneDebugInfoFrom()

dropDbgRecords()

void DbgMarker::dropDbgRecords ( )

dropOneDbgRecord()

void DbgMarker::dropOneDbgRecord ( DbgRecord * DR )

dump()

empty()

bool llvm::DbgMarker::empty ( ) const inline

eraseFromParent()

void DbgMarker::eraseFromParent ( )

getDbgRecordRange() [1/2]

getDbgRecordRange() [2/2]

getEmptyDbgRecordRange()

getParent() [1/2]

getParent() [2/2]

insertDbgRecord() [1/2]

void DbgMarker::insertDbgRecord ( DbgRecord * New,
bool InsertAtHead )

insertDbgRecord() [2/2]

insertDbgRecordAfter()

print() [1/2]

print() [2/2]

removeFromParent()

void DbgMarker::removeFromParent ( )

removeMarker()

void DbgMarker::removeMarker ( )

EmptyDbgMarker

We generally act like all llvm Instructions have a range of DbgRecords attached to them, but in reality sometimes we don't allocate the DbgMarker to save time and memory, but still have to return ranges of DbgRecords.

When we need to describe such an unallocated DbgRecord range, use this static markers range instead. This will bite us if someone tries to insert a DbgRecord in that range, but they should be using the Official (TM) API for that.

Definition at line 682 of file DebugProgramInstruction.h.

Referenced by getEmptyDbgRecordRange().

MarkedInstr

StoredDbgRecords

List of DbgRecords, the non-instruction equivalent of llvm.dbg.

Definition at line 614 of file DebugProgramInstruction.h.

Referenced by absorbDebugValues(), absorbDebugValues(), cloneDebugInfoFrom(), dropDbgRecords(), dropOneDbgRecord(), empty(), getDbgRecordRange(), getDbgRecordRange(), insertDbgRecord(), insertDbgRecord(), insertDbgRecordAfter(), llvm::DbgRecord::removeFromParent(), and removeMarker().


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