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

Base class for non-instruction debug metadata records that have positions within IR. More...

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

Public Member Functions
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)
DbgMarker * getMarker ()
const DbgMarker * getMarker () const
LLVM_ABI BasicBlock * getBlock ()
LLVM_ABI const BasicBlock * getBlock () const
LLVM_ABI Function * getFunction ()
LLVM_ABI const Function * getFunction () const
LLVM_ABI Module * getModule ()
LLVM_ABI const Module * getModule () const
LLVM_ABI LLVMContext & getContext ()
LLVM_ABI const LLVMContext & getContext () const
LLVM_ABI const Instruction * getInstruction () const
LLVM_ABI const BasicBlock * getParent () const
LLVM_ABI BasicBlock * getParent ()
LLVM_ABI void removeFromParent ()
LLVM_ABI void eraseFromParent ()
DbgRecord * getNextNode ()
DbgRecord * getPrevNode ()
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 DbgRecord * clone () 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 DbgInfoIntrinsic * createDebugIntrinsic (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, bool > isSentinel () 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)
Protected Attributes
DebugLoc DbgLoc
Kind RecordKind
Subclass discriminator.
Additional Inherited Members
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

Base class for non-instruction debug metadata records that have positions within IR.

Features various methods copied across from the Instruction class to aid ease-of-use. DbgRecords should always be linked into a DbgMarker's StoredDbgRecords list. The marker connects a DbgRecord back to its position in the BasicBlock.

We need a discriminator for dyn/isa casts. In order to avoid paying for a vtable for "virtual" functions too, subclasses must add a new discriminator value (RecordKind) and cases to a few functions in the base class: deleteRecord clone isIdenticalToWhenDefined both print methods createDebugIntrinsic

Definition at line 139 of file DebugProgramInstruction.h.

const_self_iterator

self_iterator

Kind

llvm::DbgRecord::DbgRecord ( Kind RecordKind, DebugLoc DL ) inline

Definition at line 151 of file DebugProgramInstruction.h.

References DbgLoc, DL, and RecordKind.

Referenced by llvm::DbgLabelRecord::classof(), llvm::DbgVariableRecord::classof(), clone(), llvm::DbgLabelRecord::DbgLabelRecord(), llvm::DbgVariableRecord::DbgVariableRecord(), llvm::DbgVariableRecord::DbgVariableRecord(), llvm::DbgVariableRecord::DbgVariableRecord(), llvm::DbgVariableRecord::DbgVariableRecord(), getNextNode(), getPrevNode(), insertAfter(), insertBefore(), isEquivalentTo(), isIdenticalToWhenDefined(), moveAfter(), and moveBefore().

~DbgRecord()

llvm::DbgRecord::~DbgRecord ( ) protecteddefault

Similarly to Value, we avoid paying the cost of a vtable by protecting the dtor and having deleteRecord dispatch cleanup.

Use deleteRecord to delete a generic record.

clone()

createDebugIntrinsic()

deleteRecord()

void DbgRecord::deleteRecord ( )

dump()

eraseFromParent()

void DbgRecord::eraseFromParent ( )

getBlock() [1/2]

getBlock() [2/2]

getContext() [1/2]

getContext() [2/2]

getDebugLoc()

DebugLoc llvm::DbgRecord::getDebugLoc ( ) const inline

Definition at line 214 of file DebugProgramInstruction.h.

References DbgLoc.

Referenced by buildOverlapMapAndRecordDeclares(), llvm::DbgLabelRecord::clone(), llvm::DbgLabelRecord::createDebugIntrinsic(), llvm::DbgVariableRecord::createDebugIntrinsic(), llvm::DbgVariableRecord::DbgVariableRecord(), llvm::DbgVariableRecord::DbgVariableRecord(), findVarsWithStackSlot(), fixupDebugInfoPostExtraction(), getAggregateVariable(), llvm::getDebugValueLoc(), llvm::FastISel::handleDbgInfo(), insertNewDbgInst(), isEquivalentTo(), llvm::DebugInfoFinder::processDbgRecord(), remarkAlloca(), llvm::coro::salvageDebugInfo(), llvm::ValueEnumerator::ValueEnumerator(), and llvm::SelectionDAGBuilder::visitDbgInfo().

getFunction() [1/2]

getFunction() [2/2]

getInstruction()

getMarker() [1/2]

DbgMarker * llvm::DbgRecord::getMarker ( ) inline

Definition at line 177 of file DebugProgramInstruction.h.

References Marker.

Referenced by llvm::DbgMarker::dropOneDbgRecord(), getModuleFromDPI(), getNextNode(), insertAfter(), insertAfter(), insertBefore(), insertBefore(), llvm::DbgMarker::insertDbgRecord(), llvm::DbgMarker::insertDbgRecordAfter(), moveAfter(), moveAfter(), moveBefore(), moveBefore(), removeFromParent(), and rewriteDebugUsers().

getMarker() [2/2]

getModule() [1/2]

Module * DbgRecord::getModule ( )

getModule() [2/2]

getNextNode()

DbgRecord * llvm::DbgRecord::getNextNode ( ) inline

getParent() [1/2]

getParent() [2/2]

getPrevNode()

DbgRecord * llvm::DbgRecord::getPrevNode ( ) inline

getRecordKind()

Kind llvm::DbgRecord::getRecordKind ( ) const inline

insertAfter() [1/2]

void DbgRecord::insertAfter ( DbgRecord * InsertAfter )

insertAfter() [2/2]

void DbgRecord::insertAfter ( self_iterator InsertAfter )

insertBefore() [1/2]

void DbgRecord::insertBefore ( DbgRecord * InsertBefore )

insertBefore() [2/2]

void DbgRecord::insertBefore ( self_iterator InsertBefore )

isEquivalentTo()

isIdenticalToWhenDefined()

moveAfter() [1/2]

void DbgRecord::moveAfter ( DbgRecord * MoveAfter )

moveAfter() [2/2]

void DbgRecord::moveAfter ( self_iterator MoveAfter )

moveBefore() [1/2]

void DbgRecord::moveBefore ( DbgRecord * MoveBefore )

moveBefore() [2/2]

void DbgRecord::moveBefore ( self_iterator MoveBefore )

print() [1/2]

print() [2/2]

removeFromParent()

void DbgRecord::removeFromParent ( )

Definition at line 697 of file DebugProgramInstruction.cpp.

References llvm::ilist_node_impl< ilist_detail::compute_node_options< DbgRecord, Options... >::type >::getIterator(), getMarker(), Marker, and llvm::DbgMarker::StoredDbgRecords.

Referenced by DbgInserterHelper(), eraseFromParent(), hoistLockstepIdenticalDbgVariableRecords(), moveAfter(), moveAfter(), moveBefore(), moveBefore(), rewriteDebugUsers(), and llvm::coro::salvageDebugInfo().

setDebugLoc()

void llvm::DbgRecord::setDebugLoc ( DebugLoc Loc) inline

setMarker()

void llvm::DbgRecord::setMarker ( DbgMarker * M) inline

DbgLoc

Marker

Marker that this DbgRecord is linked into.

Definition at line 142 of file DebugProgramInstruction.h.

Referenced by getBlock(), getBlock(), getInstruction(), getMarker(), getMarker(), getParent(), getParent(), llvm::DbgLabelRecord::print(), llvm::DbgVariableRecord::print(), removeFromParent(), and setMarker().

RecordKind

Kind llvm::DbgRecord::RecordKind protected

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