Per‐instruction holder for debug‐info records attached before an instruction.

Synopsis

Declared in <llvm/IR/DebugProgramInstruction.h>

class DbgMarker;

Description

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.

Member Functions

Name

Description

DbgMarker [constructor]

Construct an empty marker with no attached instruction.

absorbDebugValues

absorbDebugValues overloads

cloneDebugInfoFrom

Clone DbgRecords from From into this marker.

dropDbgRecords

Erase all DbgRecords in this DbgMarker.

dropOneDbgRecord

Erase a single DbgRecord from this marker.

dump

Dump this marker to stderr for debugging.

empty

Return true if this marker stores no debug records.

eraseFromParent

Drop this marker from its instruction, delete all stored DbgRecords, and destroy the marker itself.

getDbgRecordRange

getDbgRecordRange overloads

getParent

Return the basic block that owns the instruction this marker is attached to.

insertDbgRecord

insertDbgRecord overloads

insertDbgRecordAfter

Insert a DbgRecord after a DbgRecord contained within this marker.

print

print overloads

removeFromParent

Unlink this marker from its instruction without destroying stored records.

removeMarker

Relocate stored records when this marker's instruction position goes away.

Static Member Functions

Name

Description

getEmptyDbgRecordRange

Return an empty DbgRecord range backed by EmptyDbgMarker.

Data Members

Name

Description

MarkedInstr

Link back to the Instruction that owns this marker. Can be null during operations that move a marker from one instruction to another.

StoredDbgRecords

Ordered list of DbgRecords attached at this instruction position.

Static Data Members

Name

Description

EmptyDbgMarker

Empty sentinel marker used when an instruction has no allocated marker.

Non-Member Functions

Name

Description

getDbgRecordRange

Return the range of DbgRecords attached to DebugMarker.

Created with MrDocs