LLVM: llvm::DILocation Class Reference (original) (raw)
Debug location. More...
#include "[llvm/IR/DebugInfoMetadata.h](DebugInfoMetadata%5F8h%5Fsource.html)"
| Static Public Member Functions | |
|---|---|
| static bool | isPseudoProbeDiscriminator (unsigned Discriminator) |
| static LLVM_ABI DILocation * | getMergedLocation (DILocation *LocA, DILocation *LocB) |
| Attempts to merge LocA and LocB into a single location; see DebugLoc::getMergedLocation for more details. | |
| static LLVM_ABI DILocation * | getMergedLocations (ArrayRef< DILocation * > Locs) |
| Try to combine the vector of locations passed as input in a single one. | |
| static unsigned | getMaskedDiscriminator (unsigned D, unsigned B) |
| Return the masked discriminator value for an input discrimnator value D (i.e. | |
| static unsigned | getBaseDiscriminatorBits () |
| Return the bits used for base discriminators. | |
| static unsigned | getBaseDiscriminatorFromDiscriminator (unsigned D, bool IsFSDiscriminator=false) |
| Returns the base discriminator for a given encoded discriminator D. | |
| static LLVM_ABI std::optional< unsigned > | encodeDiscriminator (unsigned BD, unsigned DF, unsigned CI) |
| Raw encoding of the discriminator. | |
| static LLVM_ABI void | decodeDiscriminator (unsigned D, unsigned &BD, unsigned &DF, unsigned &CI) |
| Raw decoder for values in an encoded discriminator D. | |
| static unsigned | getDuplicationFactorFromDiscriminator (unsigned D) |
| Returns the duplication factor for a given encoded discriminator D, or 1 if no value or 0 is encoded. | |
| static unsigned | getCopyIdentifierFromDiscriminator (unsigned D) |
| Returns the copy identifier for a given encoded discriminator D. | |
| static bool | classof (const Metadata *MD) |
| Static Public Member Functions inherited from llvm::MDNode | |
| static MDTuple * | get (LLVMContext &Context, ArrayRef< Metadata * > MDs) |
| static MDTuple * | getIfExists (LLVMContext &Context, ArrayRef< Metadata * > MDs) |
| static MDTuple * | getDistinct (LLVMContext &Context, ArrayRef< Metadata * > MDs) |
| static TempMDTuple | getTemporary (LLVMContext &Context, ArrayRef< Metadata * > MDs) |
| static LLVM_ABI void | deleteTemporary (MDNode *N) |
| Deallocate a node created by getTemporary. | |
| template<class T> | |
| static std::enable_if_t< std::is_base_of< MDNode, T >::value, T * > | replaceWithPermanent (std::unique_ptr< T, TempMDNodeDeleter > N) |
| Replace a temporary node with a permanent one. | |
| template<class T> | |
| static std::enable_if_t< std::is_base_of< MDNode, T >::value, T * > | replaceWithUniqued (std::unique_ptr< T, TempMDNodeDeleter > N) |
| Replace a temporary node with a uniqued one. | |
| template<class T> | |
| static std::enable_if_t< std::is_base_of< MDNode, T >::value, T * > | replaceWithDistinct (std::unique_ptr< T, TempMDNodeDeleter > N) |
| Replace a temporary node with a distinct one. | |
| static bool | classof (const Metadata *MD) |
| Methods for support type inquiry through isa, cast, and dyn_cast: | |
| static LLVM_ABI MDNode * | concatenate (MDNode *A, MDNode *B) |
| Methods for metadata merging. | |
| static LLVM_ABI MDNode * | intersect (MDNode *A, MDNode *B) |
| static LLVM_ABI MDNode * | getMostGenericTBAA (MDNode *A, MDNode *B) |
| static LLVM_ABI MDNode * | getMostGenericFPMath (MDNode *A, MDNode *B) |
| static LLVM_ABI MDNode * | getMostGenericRange (MDNode *A, MDNode *B) |
| static LLVM_ABI MDNode * | getMostGenericNoaliasAddrspace (MDNode *A, MDNode *B) |
| static LLVM_ABI MDNode * | getMostGenericAliasScope (MDNode *A, MDNode *B) |
| static LLVM_ABI MDNode * | getMostGenericAlignmentOrDereferenceable (MDNode *A, MDNode *B) |
| static LLVM_ABI MDNode * | getMergedProfMetadata (MDNode *A, MDNode *B, const Instruction *AInstr, const Instruction *BInstr) |
| Merge !prof metadata from two instructions. | |
| static LLVM_ABI MDNode * | getMergedMemProfMetadata (MDNode *A, MDNode *B) |
| static LLVM_ABI MDNode * | getMergedCallsiteMetadata (MDNode *A, MDNode *B) |
| static LLVM_ABI MDNode * | getMergedCalleeTypeMetadata (const MDNode *A, const MDNode *B) |
| static LLVM_ABI CaptureComponents | toCaptureComponents (const MDNode *MD) |
| Convert !captures metadata to CaptureComponents. MD may be nullptr. | |
| static LLVM_ABI MDNode * | fromCaptureComponents (LLVMContext &Ctx, CaptureComponents CC) |
| Convert CaptureComponents to !captures metadata. |
| Public Attributes | |
|---|---|
| unsigned | Line |
| unsigned unsigned | Column |
| unsigned unsigned DILocalScope * | Scope |
| unsigned unsigned DILocalScope DILocation * | InlinedAt = nullptr |
| unsigned unsigned DILocalScope DILocation bool | ImplicitCode = false |
| unsigned unsigned DILocalScope DILocation bool uint64_t | AtomGroup = 0 |
| unsigned unsigned DILocalScope DILocation bool uint64_t uint8_t | AtomRank |
| Friends | |
|---|---|
| class | LLVMContextImpl |
| class | MDNode |
| Additional Inherited Members | |
|---|---|
| Public Types inherited from llvm::MDNode | |
| using | op_iterator = const MDOperand * |
| using | op_range = iterator_range<op_iterator> |
| Public Types inherited from llvm::Metadata | |
| enum | MetadataKind |
| Static Public Attributes inherited from llvm::Metadata | |
| static constexpr const unsigned | PoisonGeneratingIDs [] |
| Metadata IDs that may generate poison. | |
| Protected Types inherited from llvm::MDNode | |
| using | mutable_op_range = iterator_range<MDOperand *> |
| Protected Types inherited from llvm::Metadata | |
| enum | StorageType { Uniqued, Distinct, Temporary } |
| Active type of storage. More... | |
| Protected Member Functions inherited from llvm::MDNode | |
| LLVM_ABI | MDNode (LLVMContext &Context, unsigned ID, StorageType Storage, ArrayRef< Metadata * > Ops1, ArrayRef< Metadata * > Ops2={}) |
| ~MDNode ()=default | |
| LLVM_ABI void * | operator new (size_t Size, size_t NumOps, StorageType Storage) |
| LLVM_ABI void | operator delete (void *Mem) |
| void | operator delete (void *, unsigned) |
| Required by std, but never called. | |
| void | operator delete (void *, unsigned, bool) |
| Required by std, but never called. | |
| LLVM_ABI void | dropAllReferences () |
| MDOperand * | mutable_begin () |
| MDOperand * | mutable_end () |
| mutable_op_range | mutable_operands () |
| LLVM_ABI void | setOperand (unsigned I, Metadata *New) |
| Set an operand. | |
| unsigned | getNumUnresolved () const |
| void | setNumUnresolved (unsigned N) |
| LLVM_ABI void | storeDistinctInContext () |
| void | resize (size_t NumOps) |
| Resize the node to hold NumOps operands. | |
| Protected Member Functions inherited from llvm::Metadata | |
| Metadata (unsigned ID, StorageType Storage) | |
| ~Metadata ()=default | |
| void | handleChangedOperand (void *, Metadata *) |
| Default handling of a changed operand, which asserts. | |
| Static Protected Member Functions inherited from llvm::MDNode | |
| template<class T, class StoreT> | |
| static T * | storeImpl (T *N, StorageType Storage, StoreT &Store) |
| template<class T> | |
| static T * | storeImpl (T *N, StorageType Storage) |
| Protected Attributes inherited from llvm::Metadata | |
| unsigned char | Storage: 7 |
| Storage flag for non-uniqued, otherwise unowned, metadata. | |
| unsigned char | SubclassData1: 1 |
| unsigned short | SubclassData16 = 0 |
| unsigned | SubclassData32 = 0 |
Debug location.
A debug location in source code, used for debug info and otherwise.
Uses the SubclassData1, SubclassData16 and SubclassData32 Metadata slots.
Definition at line 2609 of file DebugInfoMetadata.h.
◆ classof()
◆ cloneByMultiplyingDuplicationFactor()
| std::optional< const DILocation * > llvm::DILocation::cloneByMultiplyingDuplicationFactor ( unsigned DF) const | inline |
|---|
◆ cloneWithBaseDiscriminator()
◆ cloneWithDiscriminator()
◆ decodeDiscriminator()
◆ DEFINE_MDNODE_GET()
| llvm::DILocation::DEFINE_MDNODE_GET | ( | DILocation | , |
|---|---|---|---|
| (unsigned Line, unsigned Column, Metadata *Scope, Metadata *InlinedAt=nullptr, bool ImplicitCode=false, uint64_t AtomGroup=0, uint8_t AtomRank=0) | , | ||
| (Line, Column, Scope, InlinedAt, ImplicitCode, AtomGroup, AtomRank) | ) |
◆ encodeDiscriminator()
Raw encoding of the discriminator.
APIs such as cloneWithDuplicationFactor have certain special case behavior (e.g. treating empty duplication factor as the value '1'). This API, in conjunction with cloneWithDiscriminator, may be used to encode the raw values provided.
BD: base discriminator DF: duplication factor CI: copy index
The return is std::nullopt if the values cannot be encoded in 32 bits - for example, values for BD or DF larger than 12 bits. Otherwise, the return is the encoded value.
Definition at line 417 of file DebugInfoMetadata.cpp.
References llvm::CallingConv::C, decodeDiscriminator(), DF, encodeComponent(), encodingBits(), and I.
Referenced by cloneByMultiplyingDuplicationFactor(), and cloneWithBaseDiscriminator().
◆ getAtomGroup()
| uint64_t llvm::DILocation::getAtomGroup ( ) const | inline |
|---|
◆ getAtomRank()
| uint8_t llvm::DILocation::getAtomRank ( ) const | inline |
|---|
◆ getBaseDiscriminator()
| unsigned llvm::DILocation::getBaseDiscriminator ( ) const | inline |
|---|
◆ getBaseDiscriminatorBits()
| unsigned llvm::DILocation::getBaseDiscriminatorBits ( ) | inlinestatic |
|---|
◆ getBaseDiscriminatorFromDiscriminator()
| unsigned llvm::DILocation::getBaseDiscriminatorFromDiscriminator ( unsigned D, bool IsFSDiscriminator = false ) | inlinestatic |
|---|
◆ getCopyIdentifier()
| unsigned llvm::DILocation::getCopyIdentifier ( ) const | inline |
|---|
◆ getCopyIdentifierFromDiscriminator()
| unsigned llvm::DILocation::getCopyIdentifierFromDiscriminator ( unsigned D) | inlinestatic |
|---|
◆ getDuplicationFactor()
| unsigned llvm::DILocation::getDuplicationFactor ( ) const | inline |
|---|
◆ getDuplicationFactorFromDiscriminator()
| unsigned llvm::DILocation::getDuplicationFactorFromDiscriminator ( unsigned D) | inlinestatic |
|---|
◆ getMaskedDiscriminator()
◆ getMergedLocation()
Attempts to merge LocA and LocB into a single location; see DebugLoc::getMergedLocation for more details.
NB: When merging the locations of instructions, prefer to use DebugLoc::getMergedLocation(), as an instruction's DebugLoc may contain additional metadata that will not be preserved when merging the unwrapped DILocations.
Definition at line 223 of file DebugInfoMetadata.cpp.
References A(), assert(), B(), llvm::CallingConv::C, cloneAndReplaceParentScope(), llvm::dyn_cast(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::MDNode::get(), llvm::MDNode::getContext(), getNearestMatchingScope(), I, InlinedAt, IT, Line, llvm::PickMergedSourceLocations(), Scope, and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::try_emplace().
Referenced by combineFPFusedMultiply(), llvm::DebugLoc::getMergedLocation(), and getMergedLocations().
◆ getMergedLocations()
◆ getRawInlinedAt()
| Metadata * llvm::DILocation::getRawInlinedAt ( ) const | inline |
|---|
◆ getRawScope()
| Metadata * llvm::DILocation::getRawScope ( ) const | inline |
|---|
◆ getWithoutAtom()
◆ isPseudoProbeDiscriminator()
| bool llvm::DILocation::isPseudoProbeDiscriminator ( unsigned Discriminator) | inlinestatic |
|---|
◆ replaceOperandWith()
◆ LLVMContextImpl
◆ MDNode
◆ AtomGroup
◆ AtomRank
◆ Column
◆ ImplicitCode
◆ InlinedAt
◆ Line
◆ Scope
The documentation for this class was generated from the following files:
- include/llvm/IR/DebugInfoMetadata.h
- lib/IR/DebugInfoMetadata.cpp