LLVM: llvm::Metadata Class Reference (original) (raw)
Root of the metadata hierarchy. More...
#include "[llvm/IR/Metadata.h](Metadata%5F8h%5Fsource.html)"
| Public Types | |
|---|---|
| enum | MetadataKind |
| Public Member Functions | |
|---|---|
| unsigned | getMetadataID () const |
| LLVM_ABI void | dump () const |
| User-friendly dump. | |
| LLVM_ABI void | dump (const Module *M) const |
| LLVM_ABI void | print (raw_ostream &OS, const Module *M=nullptr, bool IsForDebug=false) const |
| Print. | |
| LLVM_ABI void | print (raw_ostream &OS, ModuleSlotTracker &MST, const Module *M=nullptr, bool IsForDebug=false) const |
| LLVM_ABI void | printAsOperand (raw_ostream &OS, const Module *M=nullptr) const |
| Print as operand. | |
| LLVM_ABI void | printAsOperand (raw_ostream &OS, ModuleSlotTracker &MST, const Module *M=nullptr) const |
| Protected Types | |
|---|---|
| enum | StorageType { Uniqued, Distinct, Temporary } |
| Active type of storage. More... |
| Protected Member Functions | |
|---|---|
| Metadata (unsigned ID, StorageType Storage) | |
| ~Metadata ()=default | |
| void | handleChangedOperand (void *, Metadata *) |
| Default handling of a changed operand, which asserts. |
| Protected Attributes | |
|---|---|
| unsigned char | Storage: 7 |
| Storage flag for non-uniqued, otherwise unowned, metadata. | |
| unsigned char | SubclassData1: 1 |
| unsigned short | SubclassData16 = 0 |
| unsigned | SubclassData32 = 0 |
| Friends | |
|---|---|
| class | ReplaceableMetadataImpl |
Root of the metadata hierarchy.
This is a root class for typeless data in the IR.
Definition at line 64 of file Metadata.h.
◆ MetadataKind
◆ StorageType
Active type of storage.
| Enumerator |
|---|
| Uniqued |
| Distinct |
| Temporary |
Definition at line 72 of file Metadata.h.
| llvm::Metadata::Metadata ( unsigned ID, StorageType Storage ) | inlineprotected |
|---|
Definition at line 88 of file Metadata.h.
References Storage, and SubclassData1.
Referenced by llvm::DIArgList::classof(), llvm::MDNode::classof(), llvm::MDString::classof(), llvm::ValueAsMetadata::classof(), llvm::DistinctMDOperandPlaceholder::DistinctMDOperandPlaceholder(), llvm::MDNode::getMergedCalleeTypeMetadata(), llvm::DIArgList::handleChangedOperand(), handleChangedOperand(), llvm::MDNode::intersect(), llvm::DIArgList::LLVMContextImpl, llvm::MDNode::MDNode(), llvm::DistinctMDOperandPlaceholder::MetadataTracking, llvm::MDNode::replaceAllUsesWith(), llvm::ValueAsMetadata::replaceAllUsesWith(), llvm::MDNode::replaceOperandWith(), llvm::DistinctMDOperandPlaceholder::replaceUseWith(), llvm::MDNode::setOperand(), llvm::MDNode::toCaptureComponents(), and llvm::ValueAsMetadata::ValueAsMetadata().
◆ ~Metadata()
| llvm::Metadata::~Metadata ( ) | protecteddefault |
|---|
◆ dump() [1/2]
User-friendly dump.
If M is provided, metadata nodes will be numbered canonically; otherwise, pointer addresses are substituted.
Note: this uses an explicit overload instead of default arguments so that the nullptr version is easy to call from a debugger.
Definition at line 5474 of file AsmWriter.cpp.
References llvm::dump(), and dump().
Referenced by dump(), dump(), and llvm::SDValue::dump().
◆ dump() [2/2]
◆ getMetadataID()
| unsigned llvm::Metadata::getMetadataID ( ) const | inline |
|---|
Definition at line 104 of file Metadata.h.
Referenced by llvm::ConstantAsMetadata::classof(), llvm::DIArgList::classof(), llvm::DIAssignID::classof(), llvm::DIBasicType::classof(), llvm::DICommonBlock::classof(), llvm::DICompileUnit::classof(), llvm::DICompositeType::classof(), llvm::DIDerivedType::classof(), llvm::DIEnumerator::classof(), llvm::DIExpression::classof(), llvm::DIFile::classof(), llvm::DIFixedPointType::classof(), llvm::DIGenericSubrange::classof(), llvm::DIGlobalVariable::classof(), llvm::DIGlobalVariableExpression::classof(), llvm::DILabel::classof(), llvm::DILexicalBlock::classof(), llvm::DILexicalBlockBase::classof(), llvm::DILexicalBlockFile::classof(), llvm::DILocalScope::classof(), llvm::DILocalVariable::classof(), llvm::DILocation::classof(), llvm::DIMacro::classof(), llvm::DIMacroFile::classof(), llvm::DIMacroNode::classof(), llvm::DINamespace::classof(), llvm::DINode::classof(), llvm::DIObjCProperty::classof(), llvm::DIScope::classof(), llvm::DIStringType::classof(), llvm::DISubprogram::classof(), llvm::DISubrange::classof(), llvm::DISubrangeType::classof(), llvm::DISubroutineType::classof(), llvm::DITemplateParameter::classof(), llvm::DITemplateTypeParameter::classof(), llvm::DITemplateValueParameter::classof(), llvm::DIType::classof(), llvm::DIVariable::classof(), llvm::GenericDINode::classof(), llvm::LocalAsMetadata::classof(), llvm::MDNode::classof(), llvm::MDString::classof(), llvm::MDTuple::classof(), llvm::ValueAsMetadata::classof(), llvm::MDNode::clone(), llvm::ReplaceableMetadataImpl::getAllArgListUsers(), llvm::MDNode::isAlwaysReplaceable(), llvm::ReplaceableMetadataImpl::replaceAllUsesWith(), llvm::MDNode::resize(), and llvm::MDNode::storeDistinctInContext().
◆ handleChangedOperand()
| void llvm::Metadata::handleChangedOperand ( void * , Metadata * ) | inlineprotected |
|---|
Default handling of a changed operand, which asserts.
If subclasses pass themselves in as owners to a tracking node reference, they must provide an implementation of this method.
Definition at line 99 of file Metadata.h.
References llvm_unreachable, and Metadata().
◆ print() [1/2]
◆ print() [2/2]
◆ printAsOperand() [1/2]
◆ printAsOperand() [2/2]
◆ ReplaceableMetadataImpl
◆ PoisonGeneratingIDs
◆ Storage
Storage flag for non-uniqued, otherwise unowned, metadata.
Definition at line 75 of file Metadata.h.
Referenced by llvm::DIBasicType::DIBasicType(), llvm::DIBasicType::DIBasicType(), llvm::DILexicalBlockBase::DILexicalBlockBase(), llvm::DILocalScope::DILocalScope(), llvm::DIMacroNode::DIMacroNode(), llvm::DINode::DINode(), llvm::DIScope::DIScope(), llvm::DITemplateParameter::DITemplateParameter(), llvm::DIType::DIType(), llvm::DIVariable::DIVariable(), llvm::DIBasicType::getImpl(), llvm::DIBasicType::getImpl(), llvm::DIBasicType::getImpl(), llvm::MDNode::isDistinct(), llvm::MDNode::isTemporary(), llvm::MDNode::isUniqued(), llvm::DIAssignID::MDNode, llvm::DICommonBlock::MDNode, llvm::DICompositeType::MDNode, llvm::DIDerivedType::MDNode, llvm::DIEnumerator::MDNode, llvm::DIExpression::MDNode, llvm::DIFixedPointType::MDNode, llvm::DIGenericSubrange::MDNode, llvm::DIGlobalVariable::MDNode, llvm::DIGlobalVariableExpression::MDNode, llvm::DIImportedEntity::MDNode, llvm::DILabel::MDNode, llvm::DILexicalBlock::MDNode, llvm::DILexicalBlockFile::MDNode, llvm::DILocalVariable::MDNode, llvm::DILocation::MDNode, llvm::DIMacro::MDNode, llvm::DIMacroFile::MDNode, llvm::DIModule::MDNode, llvm::DINamespace::MDNode, llvm::DIObjCProperty::MDNode, llvm::DIStringType::MDNode, llvm::DISubrange::MDNode, llvm::DISubrangeType::MDNode, llvm::DISubroutineType::MDNode, llvm::DITemplateTypeParameter::MDNode, llvm::DITemplateValueParameter::MDNode, llvm::GenericDINode::MDNode, llvm::MDNode::MDNode(), llvm::MDTuple::MDNode, Metadata(), llvm::MDNode::storeDistinctInContext(), llvm::MDNode::storeImpl(), llvm::MDNode::storeImpl(), and llvm::MDNode::~MDNode().
◆ SubclassData1
◆ SubclassData16
| unsigned short llvm::Metadata::SubclassData16 = 0 | protected |
|---|
◆ SubclassData32
| unsigned llvm::Metadata::SubclassData32 = 0 | protected |
|---|
Definition at line 79 of file Metadata.h.
Referenced by llvm::DistinctMDOperandPlaceholder::DistinctMDOperandPlaceholder(), llvm::DIVariable::DIVariable(), llvm::DIType::getAlignInBits(), llvm::DIVariable::getAlignInBits(), llvm::DILexicalBlockFile::getDiscriminator(), llvm::GenericDINode::getHash(), llvm::MDTuple::getHash(), llvm::DistinctMDOperandPlaceholder::getID(), llvm::DILabel::getLine(), llvm::DILexicalBlock::getLine(), llvm::DIMacro::getLine(), llvm::DIMacroFile::getLine(), llvm::DICommonBlock::getLineNo(), llvm::DIType::init(), llvm::DIEnumerator::isUnsigned(), llvm::DIDerivedType::MDNode, llvm::DIImportedEntity::MDNode, llvm::DILexicalBlock::MDNode, llvm::DILexicalBlockFile::MDNode, llvm::DIMacro::MDNode, and llvm::DIMacroFile::MDNode.
The documentation for this class was generated from the following files:
- include/llvm/IR/Metadata.h
- lib/IR/AsmWriter.cpp