llvm::DebugLoc

A debug info location.

Synopsis

Declared in <llvm/IR/DebugLoc.h>

class DebugLoc;

Description

This class is a wrapper around an DILocation pointer.

To avoid extra includes, DebugLoc doubles the DILocation API with a one based on relatively opaque MDNode pointers.

Enums

NameDescription
Unnamed enum Constants for controlling inlined-at chain updates.

Member Functions

NameDescription
DebugLoc [constructor]Construct from an DILocation.
dump Dump this debug location to stderr for debugging.
get Get the underlying DILocation.
getAsMDNode Return this as a bar MDNode.
getCol Return the source column number for this location.
getCopied Return a copy of this DebugLoc.
getFnDebugLoc Find the debug info location for the start of the function.
getInlinedAt Return the inlined-at location for this debug location, or null if none.
getInlinedAtScope Get the fully inlined-at scope for a DebugLoc.
getLine Return the source line number for this location.
getScope Return the lexical scope metadata for this location.
isImplicitCode Check if the DebugLoc corresponds to an implicit code.
isSameSourceLocation Return true if the source locations match, ignoring isImplicitCode and source atom info.
operator* Return a reference to the underlying DILocation.
operator-> Dereference the wrapped DILocation pointer.
orElse Return this DebugLoc if non-empty; otherwise return Other.
print Print this debug location to the given output stream.
setImplicitCode Mark whether this debug location describes compiler-inserted implicit code.
operator DILocation* Convert to the underlying DILocation pointer.
operator bool Check for null.
operator== Return true if both locations refer to the same underlying debug-loc representation.
operator!= Return true if the locations refer to different underlying representations.

Static Member Functions

NameDescription
appendInlinedAt Rebuild the entire inlined-at chain for this instruction so that the top of the chain now is inlined-at the new call site.
getCompilerGenerated Return a DebugLoc for a compiler-generated instruction with no source line. When coverage tracking is disabled, returns an empty DebugLoc.
getDropped Return a DebugLoc marking a location that was intentionally dropped. When coverage tracking is disabled, returns an empty DebugLoc.
getMergedLocation Merge two instruction debug locations into one.
getMergedLocations Try to combine the vector of locations passed as input in a single one. This function applies getMergedLocation() repeatedly left-to-right.
getTemporary Return a DebugLoc for a temporary, non-emitted instruction location. When coverage tracking is disabled, returns an empty DebugLoc.
getUnknown Return a DebugLoc for an unknown or unknowable source location. When coverage tracking is disabled, returns an empty DebugLoc.
replaceInlinedAtSubprogram Rebuild the entire inline-at chain by replacing the subprogram at the end of the chain with NewSP.

Non-Member Functions

NameDescription
formatCallSiteLocationGet call site location as a string with the given format
getDebugValueLocProduce a DebugLoc to use for each dbg.declare that is promoted to a dbg.value.
mapAtomInstanceMark a cloned instruction as a new instance so that its source loc can be updated when remapped.