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.
Synopsis
Declared in <llvm/IR/DebugProgramInstruction.h>
class DbgMarker;
Description
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 |
|
Default constructor |
|
|
Clone all DbgMarkers from |
|
Erase all DbgRecords in this DbgMarker. |
|
Erase a single DbgRecord from this marker. In an ideal future, we would never erase an assignment in this way, but it's the equivalent to erasing a debug intrinsic from a block. |
|
Produce a range over all the DbgRecords in this Marker. |
|
|
|
Insert a DbgRecord after a DbgRecord contained within this marker. |
|
Implement operator<< on DbgMarker. |
|
Handle the removal of a marker: the position of debug‐info has gone away, but the stored debug records should not. Drop them onto the next instruction, or otherwise work out what to do with them. |
Static Member Functions
Data Members
Name |
Description |
Link back to the Instruction that owns this marker. Can be null during operations that move a marker from one instruction to another. |
|
List of DbgRecords, the non‐instruction equivalent of llvm.dbg.* intrinsics. There is a one‐to‐one relationship between each debug intrinsic in a block and each DbgRecord once the representation has been converted, and the ordering is meaningful in the same way. |
Static Data Members
Name |
Description |
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 ™ API for that. |
Non-Member Functions
Name |
Description |
Inline helper to return a range of DbgRecords attached to a marker. It needs to be inlined as it's frequently called, but also come after the declaration of DbgMarker. Thus: it's pre‐declared by users like Instruction, then an inlineable body defined here. |
Created with MrDocs