Base class for non-instruction debug metadata records that have positions within IR.More...
#include "llvm/IR/DebugProgramInstruction.h"
Public Types | |
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 | |
DbgMarker * | Marker = nullptr |
Marker that thisDbgRecord is linked into. | |
Protected Member Functions | |
~DbgRecord ()=default | |
Similarly toValue, we avoid paying the cost of a vtable by protecting the dtor and having deleteRecord dispatch cleanup. | |
![]() | |
ilist_node_impl ()=default | |
Protected Attributes | |
DebugLoc | DbgLoc |
Kind | RecordKind |
Subclass discriminator. | |
Additional Inherited Members | |
![]() | |
using | self_iterator = typenameilist_select_iterator_type< OptionsT::has_iterator_bits, OptionsT, false, false >::type |
using | const_self_iterator = typenameilist_select_iterator_type< OptionsT::has_iterator_bits, OptionsT, false,true >::type |
using | reverse_self_iterator = typenameilist_select_iterator_type< OptionsT::has_iterator_bits, OptionsT,true, false >::type |
using | const_reverse_self_iterator = typenameilist_select_iterator_type< OptionsT::has_iterator_bits, OptionsT,true,true >::type |
Base class for non-instruction debug metadata records that have positions within IR.
Features various methods copied across from theInstruction class to aid ease-of-use. DbgRecords should always be linked into aDbgMarker's StoredDbgRecords list. The marker connects aDbgRecord back to its position in theBasicBlock.
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 line134 of fileDebugProgramInstruction.h.
Definition at line214 of fileDebugProgramInstruction.h.
usingllvm::DbgRecord::self_iterator =simple_ilist<DbgRecord>::iterator |
Definition at line213 of fileDebugProgramInstruction.h.
Subclass discriminator.
Enumerator | |
---|---|
ValueKind | |
LabelKind |
Definition at line139 of fileDebugProgramInstruction.h.
Definition at line146 of fileDebugProgramInstruction.h.
| protecteddefault |
DbgRecord * llvm::DbgRecord::clone | ( | ) | const |
Definition at line384 of fileDebugProgramInstruction.cpp.
ReferencesLabelKind,llvm_unreachable,RecordKind, andValueKind.
DbgInfoIntrinsic * llvm::DbgRecord::createDebugIntrinsic | ( | Module * | M, |
Instruction * | InsertBefore | ||
) | const |
Convert thisDbgRecord back into an appropriate llvm.dbg.
InsertBefore
Optional position to insert this intrinsic.Definition at line135 of fileDebugProgramInstruction.cpp.
ReferencesLabelKind,llvm_unreachable,RecordKind, andValueKind.
void llvm::DbgRecord::deleteRecord | ( | ) |
Methods that dispatch to subclass implementations.
These need to be manually updated when a new subclass is added.
Definition at line79 of fileDebugProgramInstruction.cpp.
ReferencesRecordKind, andValueKind.
Referenced byllvm::DbgMarker::dropDbgRecords(),llvm::DbgMarker::dropOneDbgRecord(), anderaseFromParent().
LLVM_DUMP_METHOD void DbgRecord::dump | ( | ) | const |
Definition at line5315 of fileAsmWriter.cpp.
Referencesllvm::dbgs(), andprint().
void llvm::DbgRecord::eraseFromParent | ( | ) |
Definition at line679 of fileDebugProgramInstruction.cpp.
ReferencesdeleteRecord(), andremoveFromParent().
BasicBlock * llvm::DbgRecord::getBlock | ( | ) |
Definition at line513 of fileDebugProgramInstruction.cpp.
Referencesllvm::DbgMarker::getParent(), andMarker.
Referenced bygetContext(), andgetFunction().
constBasicBlock * llvm::DbgRecord::getBlock | ( | ) | const |
Definition at line515 of fileDebugProgramInstruction.cpp.
Referencesllvm::DbgMarker::getParent(), andMarker.
LLVMContext & llvm::DbgRecord::getContext | ( | ) |
Definition at line529 of fileDebugProgramInstruction.cpp.
ReferencesgetBlock(), andllvm::BasicBlock::getContext().
Referenced byllvm::DbgVariableRecord::addVariableLocationOps(),llvm::DbgLabelRecord::createDebugIntrinsic(),llvm::getDebugValueLoc(), andllvm::DbgVariableRecord::replaceVariableLocationOp().
constLLVMContext & llvm::DbgRecord::getContext | ( | ) | const |
Definition at line531 of fileDebugProgramInstruction.cpp.
ReferencesgetBlock(), andllvm::BasicBlock::getContext().
| inline |
Definition at line208 of fileDebugProgramInstruction.h.
ReferencesDbgLoc.
Referenced bybuildOverlapMapAndRecordDeclares(),llvm::DbgLabelRecord::clone(),llvm::DbgLabelRecord::createDebugIntrinsic(),llvm::DbgVariableRecord::createDebugIntrinsic(),DbgVariableRecordsRemoveRedundantDbgInstrsUsingBackwardScan(),findVarsWithStackSlot(),fixupDebugInfoPostExtraction(),getAggregateVariable(),llvm::getDebugValueLoc(),llvm::FastISel::handleDbgInfo(),insertNewDbgInst(),isEquivalentTo(),llvm::DebugInfoFinder::processDbgRecord(),llvm::coro::salvageDebugInfo(),llvm::ValueEnumerator::ValueEnumerator(), andllvm::SelectionDAGBuilder::visitDbgInfo().
Function * llvm::DbgRecord::getFunction | ( | ) |
Definition at line517 of fileDebugProgramInstruction.cpp.
ReferencesgetBlock(), andllvm::BasicBlock::getParent().
Referenced bygetModule(), andllvm::coro::salvageDebugInfo().
Definition at line519 of fileDebugProgramInstruction.cpp.
ReferencesgetBlock(), andllvm::BasicBlock::getParent().
constInstruction * llvm::DbgRecord::getInstruction | ( | ) | const |
Definition at line503 of fileDebugProgramInstruction.cpp.
Referencesllvm::DbgMarker::MarkedInstr, andMarker.
| inline |
Definition at line171 of fileDebugProgramInstruction.h.
ReferencesMarker.
Referenced byllvm::DbgMarker::dropOneDbgRecord(),getModuleFromDPI(),getNextNode(),insertAfter(),insertBefore(),llvm::DbgMarker::insertDbgRecord(),llvm::DbgMarker::insertDbgRecordAfter(),moveAfter(),moveBefore(),removeFromParent(), andrewriteDebugUsers().
Definition at line172 of fileDebugProgramInstruction.h.
ReferencesMarker.
Module * llvm::DbgRecord::getModule | ( | ) |
Definition at line523 of fileDebugProgramInstruction.cpp.
ReferencesgetFunction(), andllvm::GlobalValue::getParent().
Referenced byvalueCoversEntireFragment().
Definition at line525 of fileDebugProgramInstruction.cpp.
ReferencesgetFunction(), andllvm::GlobalValue::getParent().
| inline |
Definition at line193 of fileDebugProgramInstruction.h.
BasicBlock * llvm::DbgRecord::getParent | ( | ) |
Definition at line511 of fileDebugProgramInstruction.cpp.
Referencesllvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(),llvm::DbgMarker::MarkedInstr, andMarker.
constBasicBlock * llvm::DbgRecord::getParent | ( | ) | const |
Definition at line507 of fileDebugProgramInstruction.cpp.
Referencesllvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(),llvm::DbgMarker::MarkedInstr, andMarker.
Referenced byllvm::JumpThreadingPass::updateSSA().
| inline |
Definition at line194 of fileDebugProgramInstruction.h.
| inline |
Definition at line167 of fileDebugProgramInstruction.h.
ReferencesRecordKind.
void llvm::DbgRecord::insertAfter | ( | DbgRecord * | InsertAfter | ) |
Definition at line543 of fileDebugProgramInstruction.cpp.
Referencesassert(),getMarker(), andllvm::DbgMarker::insertDbgRecordAfter().
Referenced bymoveAfter().
void llvm::DbgRecord::insertAfter | ( | self_iterator | InsertAfter | ) |
Definition at line560 of fileDebugProgramInstruction.cpp.
Referencesassert(), andgetMarker().
void llvm::DbgRecord::insertBefore | ( | DbgRecord * | InsertBefore | ) |
Definition at line535 of fileDebugProgramInstruction.cpp.
Referencesassert(),getMarker(), andllvm::DbgMarker::insertDbgRecord().
Referenced bymoveBefore().
void llvm::DbgRecord::insertBefore | ( | self_iterator | InsertBefore | ) |
Definition at line552 of fileDebugProgramInstruction.cpp.
Referencesassert(), andgetMarker().
Same as isIdenticalToWhenDefined but checksDebugLoc too.
Definition at line130 of fileDebugProgramInstruction.cpp.
ReferencesgetDebugLoc(), andisIdenticalToWhenDefined().
Definition at line116 of fileDebugProgramInstruction.cpp.
ReferencesLabelKind,llvm_unreachable,RecordKind, andValueKind.
Referenced byisEquivalentTo().
void llvm::DbgRecord::moveAfter | ( | DbgRecord * | MoveAfter | ) |
Definition at line575 of fileDebugProgramInstruction.cpp.
Referencesassert(),getMarker(),insertAfter(), andremoveFromParent().
void llvm::DbgRecord::moveAfter | ( | self_iterator | MoveAfter | ) |
Definition at line588 of fileDebugProgramInstruction.cpp.
Referencesassert(),getMarker(),insertAfter(), andremoveFromParent().
void llvm::DbgRecord::moveBefore | ( | DbgRecord * | MoveBefore | ) |
Definition at line569 of fileDebugProgramInstruction.cpp.
Referencesassert(),getMarker(),insertBefore(), andremoveFromParent().
void llvm::DbgRecord::moveBefore | ( | self_iterator | MoveBefore | ) |
Definition at line582 of fileDebugProgramInstruction.cpp.
Referencesassert(),getMarker(),insertBefore(), andremoveFromParent().
void llvm::DbgRecord::print | ( | raw_ostream & | O, |
bool | IsForDebug =false | ||
) | const |
Definition at line91 of fileDebugProgramInstruction.cpp.
Referenced bydump().
void llvm::DbgRecord::print | ( | raw_ostream & | O, |
ModuleSlotTracker & | MST, | ||
bool | IsForDebug | ||
) | const |
Definition at line103 of fileDebugProgramInstruction.cpp.
ReferencesLabelKind,llvm_unreachable,RecordKind, andValueKind.
void llvm::DbgRecord::removeFromParent | ( | ) |
Definition at line674 of fileDebugProgramInstruction.cpp.
Referencesllvm::ilist_node_impl< OptionsT >::getIterator(),getMarker(),Marker, andllvm::DbgMarker::StoredDbgRecords.
Referenced byDbgInserterHelper(),eraseFromParent(),hoistLockstepIdenticalDbgVariableRecords(),moveAfter(),moveBefore(),rewriteDebugUsers(), andllvm::coro::salvageDebugInfo().
| inline |
Definition at line209 of fileDebugProgramInstruction.h.
ReferencesDbgLoc.
Referenced byllvm::coro::salvageDebugInfo().
| inline |
Definition at line169 of fileDebugProgramInstruction.h.
ReferencesMarker.
Referenced byllvm::DbgMarker::absorbDebugValues().
| protected |
Definition at line142 of fileDebugProgramInstruction.h.
Referenced bygetDebugLoc(),llvm::DbgVariableRecord::isEquivalentTo(), andsetDebugLoc().
DbgMarker* llvm::DbgRecord::Marker = nullptr |
Marker that thisDbgRecord is linked into.
Definition at line137 of fileDebugProgramInstruction.h.
Referenced bygetBlock(),getInstruction(),getMarker(),getParent(),llvm::DbgLabelRecord::print(),llvm::DbgVariableRecord::print(),removeFromParent(), andsetMarker().
| protected |
Subclass discriminator.
Definition at line143 of fileDebugProgramInstruction.h.
Referenced byclone(),createDebugIntrinsic(),deleteRecord(),getRecordKind(),isIdenticalToWhenDefined(), andprint().