LLVM: llvm::DebugLoc Class Reference (original) (raw)
A debug info location. More...
#include "[llvm/IR/DebugLoc.h](DebugLoc%5F8h%5Fsource.html)"
| Public Types | |
|---|---|
| enum | { ReplaceLastInlinedAt = true } |
| Static Public Member Functions | |
|---|---|
| static DebugLoc | getTemporary () |
| static DebugLoc | getUnknown () |
| static DebugLoc | getCompilerGenerated () |
| static DebugLoc | getDropped () |
| static LLVM_ABI DebugLoc | getMergedLocation (DebugLoc LocA, DebugLoc LocB) |
| When two instructions are combined into a single instruction we also need to combine the original locations into a single location. | |
| static LLVM_ABI DebugLoc | getMergedLocations (ArrayRef< DebugLoc > Locs) |
| Try to combine the vector of locations passed as input in a single one. | |
| static LLVM_ABI DebugLoc | appendInlinedAt (const DebugLoc &DL, DILocation *InlinedAt, LLVMContext &Ctx, DenseMap< const MDNode *, MDNode * > &Cache) |
| Rebuild the entire inlined-at chain for this instruction so that the top of the chain now is inlined-at the new call site. | |
| static LLVM_ABI DebugLoc | replaceInlinedAtSubprogram (const DebugLoc &DL, DISubprogram &NewSP, LLVMContext &Ctx, DenseMap< const MDNode *, MDNode * > &Cache) |
| Rebuild the entire inline-at chain by replacing the subprogram at the end of the chain with NewSP. |
A debug info location.
This class is a wrapper around a tracking reference to an DILocation pointer.
To avoid extra includes, DebugLoc doubles the DILocation API with a one based on relatively opaque MDNode pointers.
Definition at line 123 of file DebugLoc.h.
◆ anonymous enum
| Enumerator |
|---|
| ReplaceLastInlinedAt |
Definition at line 245 of file DebugLoc.h.
◆ DebugLoc() [1/3]
| llvm::DebugLoc::DebugLoc ( ) | default |
|---|
Referenced by appendInlinedAt(), getCompilerGenerated(), getCopied(), getDropped(), getFnDebugLoc(), getMergedLocation(), getMergedLocations(), getTemporary(), getUnknown(), isSameSourceLocation(), operator!=(), operator==(), orElse(), print(), and replaceInlinedAtSubprogram().
◆ DebugLoc() [2/3]
◆ DebugLoc() [3/3]
Construct from an MDNode.
Note: if N is not an DILocation, a verifier check will fail, and accessors will crash. However, construction from other nodes is supported in order to handle forward references when reading textual IR.
Definition at line 46 of file DebugLoc.cpp.
◆ appendInlinedAt()
◆ dump()
◆ get()
Get the underlying DILocation.
Precondition
!*this or isa<DILocation>(getAsMDNode()).
Definition at line 48 of file DebugLoc.cpp.
References llvm::cast_or_null().
Referenced by llvm::addLocationToRemarks(), llvm::ConvertDebugDeclareToDebugValue(), llvm::ConvertDebugDeclareToDebugValue(), fixupLineNumbers(), llvm::formatCallSiteLocation(), getCol(), getInlinedAt(), getLine(), getScope(), insertDbgValueOrDbgVariableRecord(), isImplicitCode(), isSameSourceLocation(), operator DILocation *(), operator*(), operator->(), llvm::DebugInfoFinder::processDbgRecord(), and setImplicitCode().
◆ getAsMDNode()
| MDNode * llvm::DebugLoc::getAsMDNode ( ) const | inline |
|---|
◆ getCol()
◆ getCompilerGenerated()
| DebugLoc llvm::DebugLoc::getCompilerGenerated ( ) | inlinestatic |
|---|
◆ getCopied()
| DebugLoc llvm::DebugLoc::getCopied ( ) const | inline |
|---|
◆ getDropped()
| DebugLoc llvm::DebugLoc::getDropped ( ) | inlinestatic |
|---|
◆ getFnDebugLoc()
| DebugLoc DebugLoc::getFnDebugLoc | ( | ) | const |
|---|
◆ getInlinedAt()
◆ getInlinedAtScope()
| MDNode * DebugLoc::getInlinedAtScope | ( | ) | const |
|---|
◆ getLine()
◆ getMergedLocation()
When two instructions are combined into a single instruction we also need to combine the original locations into a single location.
When the locations are the same we can use either location. When they differ, we need a third location which is distinct from either. If they share a common scope, use this scope and compare the line/column pair of the locations with the common scope:
- if both match, keep the line and column;
- if only the line number matches, keep the line and set the column as 0;
- otherwise set line and column as 0. If they do not share a common scope the location is ambiguous and can't be represented in a line entry. In this case, set line and column as 0 and use the scope of any location.
LocA LocB: The locations to be merged.
Definition at line 179 of file DebugLoc.cpp.
References DebugLoc(), and llvm::DILocation::getMergedLocation().
Referenced by llvm::Instruction::applyMergedLocation(), llvm::MachineBasicBlock::findBranchDebugLoc(), getMergedLocations(), mergeCompatibleInvokesImpl(), mergeDebugLocs(), llvm::InstCombinerImpl::mergeStoreIntoSuccessor(), performBlockTailMerging(), performSink(), and llvm::LegalizationArtifactCombiner::tryCombineAnyExt().
◆ getMergedLocations()
◆ getScope()
| MDNode * DebugLoc::getScope | ( | ) | const |
|---|
◆ getTemporary()
| DebugLoc llvm::DebugLoc::getTemporary ( ) | inlinestatic |
|---|
◆ getUnknown()
| DebugLoc llvm::DebugLoc::getUnknown ( ) | inlinestatic |
|---|
Definition at line 161 of file DebugLoc.h.
References DebugLoc().
Referenced by llvm::VPlanTransforms::addExplicitVectorLength(), llvm::VPlanTransforms::addMinimumIterationCheck(), llvm::VPlanTransforms::addMinimumVectorEpilogueIterationCheck(), addVPLaneMaskPhiAndUpdateExitBranch(), llvm::checkDebugInfoMetadata(), llvm::VPBuilder::createAnd(), llvm::SSAUpdaterTraits< SSAUpdater >::CreateEmptyPHI(), llvm::VPBuilder::createFCmp(), llvm::VPBuilder::createICmp(), llvm::VPBuilder::createLogicalAnd(), llvm::VPBuilder::createNaryOp(), llvm::VPBuilder::createNot(), llvm::VPBuilder::createNoWrapPtrAdd(), llvm::VPBuilder::createOr(), llvm::VPBuilder::createPtrAdd(), createReplicateRegion(), llvm::VPBuilder::createSelect(), llvm::VPBuilder::createWidePtrAdd(), expandVPWidenIntOrFpInduction(), findDebugLoc(), getDebugLocFromInstOrOperands(), getDebugLocFromPHI(), llvm::VPlanTransforms::handleUncountableEarlyExit(), llvm::InlineFunctionImpl(), optimizeLatchExitInductionUser(), transformRecipestoEVLRecipes(), llvm::VPlanTransforms::updateScalarResumePhis(), llvm::VPHeaderPHIRecipe::VPHeaderPHIRecipe(), llvm::VPHistogramRecipe::VPHistogramRecipe(), llvm::VPRecipeBase::VPRecipeBase(), llvm::VPRecipeWithIRFlags::VPRecipeWithIRFlags(), llvm::VPReductionEVLRecipe::VPReductionEVLRecipe(), llvm::VPReductionRecipe::VPReductionRecipe(), llvm::VPReductionRecipe::VPReductionRecipe(), llvm::VPScalarIVStepsRecipe::VPScalarIVStepsRecipe(), llvm::VPSingleDefRecipe::VPSingleDefRecipe(), llvm::VPSingleDefRecipe::VPSingleDefRecipe(), and llvm::VPWidenPHIRecipe::VPWidenPHIRecipe().
◆ hasTrivialDestructor()
| bool llvm::DebugLoc::hasTrivialDestructor ( ) const | inline |
|---|
◆ isImplicitCode()
| bool DebugLoc::isImplicitCode | ( | ) | const |
|---|
◆ isSameSourceLocation()
◆ operator bool()
| llvm::DebugLoc::operator bool ( ) const | inlineexplicit |
|---|
◆ operator DILocation *()
| llvm::DebugLoc::operator DILocation * ( ) const | inline |
|---|
◆ operator!=()
◆ operator*()
| DILocation & llvm::DebugLoc::operator* ( ) const | inline |
|---|
◆ operator->()
| DILocation * llvm::DebugLoc::operator-> ( ) const | inline |
|---|
◆ operator==()
◆ orElse()
If this DebugLoc is non-empty, returns this DebugLoc; otherwise, selects Other.
In coverage-tracking builds, this also accounts for whether this or Other have an annotative DebugLocKind applied, such that if both are empty but exactly one has an annotation, we prefer that annotated location.
Definition at line 195 of file DebugLoc.h.
References DebugLoc(), and llvm::Other.
◆ print()
◆ replaceInlinedAtSubprogram()
◆ setImplicitCode()
| void DebugLoc::setImplicitCode | ( | bool | ImplicitCode | ) |
|---|
The documentation for this class was generated from the following files:
- include/llvm/IR/DebugLoc.h
- lib/IR/DebugLoc.cpp