|
LLVM
8.0.1
|
Root of the metadata hierarchy. More...
#include "llvm/IR/Metadata.h"


Public Types | |
| enum | MetadataKind |
Public Member Functions | |
| unsigned | getMetadataID () const |
| void | dump () const |
| User-friendly dump. More... | |
| void | dump (const Module *M) const |
| void | print (raw_ostream &OS, const Module *M=nullptr, bool IsForDebug=false) const |
| Print. More... | |
| void | print (raw_ostream &OS, ModuleSlotTracker &MST, const Module *M=nullptr, bool IsForDebug=false) const |
| void | printAsOperand (raw_ostream &OS, const Module *M=nullptr) const |
| Print as operand. More... | |
| 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. More... | |
Protected Attributes | |
| unsigned char | Storage: 7 |
| Storage flag for non-uniqued, otherwise unowned, metadata. More... | |
| unsigned char | ImplicitCode: 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 58 of file Metadata.h.
Definition at line 78 of file Metadata.h.
|
protected |
Active type of storage.
| Enumerator | |
|---|---|
| Uniqued | |
| Distinct | |
| Temporary | |
Definition at line 66 of file Metadata.h.
|
inlineprotected |
Definition at line 84 of file Metadata.h.
References ~Metadata().
|
protecteddefault |
Referenced by Metadata().
| LLVM_DUMP_METHOD void Metadata::dump | ( | ) | const |
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 4320 of file AsmWriter.cpp.
References llvm::dump(), and LLVM_DUMP_METHOD.
Referenced by llvm::DebugLocEntry::Value::dump(), llvm::LexicalScope::dump(), getMetadataID(), and llvm::NamedMDNode::getParent().
| LLVM_DUMP_METHOD void Metadata::dump | ( | const Module * | M | ) | const |
Definition at line 4323 of file AsmWriter.cpp.
References llvm::dbgs(), LLVM_DUMP_METHOD, and print().
|
inline |
Definition at line 100 of file Metadata.h.
References DEFINE_ISA_CONVERSION_FUNCTIONS, dump(), print(), and printAsOperand().
Referenced by llvm::DINode::classof(), llvm::GenericDINode::classof(), llvm::DISubrange::classof(), llvm::ValueAsMetadata::classof(), llvm::ConstantAsMetadata::classof(), llvm::DIEnumerator::classof(), llvm::LocalAsMetadata::classof(), llvm::DIScope::classof(), llvm::DIFile::classof(), llvm::MDString::classof(), llvm::DIType::classof(), llvm::DIBasicType::classof(), llvm::MDNode::classof(), llvm::DICompositeType::classof(), llvm::DISubroutineType::classof(), llvm::MDTuple::classof(), llvm::DICompileUnit::classof(), llvm::DILocalScope::classof(), llvm::DILocation::classof(), llvm::DISubprogram::classof(), llvm::DILexicalBlockBase::classof(), llvm::DILexicalBlock::classof(), llvm::DILexicalBlockFile::classof(), llvm::DINamespace::classof(), llvm::DIModule::classof(), llvm::DITemplateParameter::classof(), llvm::DITemplateTypeParameter::classof(), llvm::DITemplateValueParameter::classof(), llvm::DIVariable::classof(), llvm::DIExpression::classof(), llvm::DIGlobalVariable::classof(), llvm::DILocalVariable::classof(), llvm::DILabel::classof(), llvm::DIObjCProperty::classof(), llvm::DIImportedEntity::classof(), llvm::DIGlobalVariableExpression::classof(), llvm::DIMacroNode::classof(), llvm::DIMacro::classof(), llvm::DIMacroFile::classof(), llvm::MDNode::clone(), llvm::MDNode::dropAllReferences(), forEachUser(), hasSelfReference(), llvm::ReplaceableMetadataImpl::replaceAllUsesWith(), and llvm::MDNode::storeDistinctInContext().
|
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 95 of file Metadata.h.
References llvm_unreachable.
Referenced by llvm::MDNode::replaceWithDistinct().
| void Metadata::print | ( | raw_ostream & | OS, |
| const Module * | M = nullptr, |
||
| bool | IsForDebug = false |
||
| ) | const |
Print.
Prints definition of this.
If M is provided, metadata nodes will be numbered canonically; otherwise, pointer addresses are substituted.
Definition at line 4277 of file AsmWriter.cpp.
References printMetadataImpl().
Referenced by createCast(), getMetadataID(), llvm::NamedMDNode::getParent(), llvm::operator<<(), llvm::ValueEnumerator::print(), and llvm::VerifierSupport::VerifierSupport().
| void Metadata::print | ( | raw_ostream & | OS, |
| ModuleSlotTracker & | MST, | ||
| const Module * | M = nullptr, |
||
| bool | IsForDebug = false |
||
| ) | const |
Definition at line 4283 of file AsmWriter.cpp.
References printMetadataImpl().
| void Metadata::printAsOperand | ( | raw_ostream & | OS, |
| const Module * | M = nullptr |
||
| ) | const |
Print as operand.
Prints reference of this.
If M is provided, metadata nodes will be numbered canonically; otherwise, pointer addresses are substituted.
Definition at line 4267 of file AsmWriter.cpp.
References printMetadataImpl().
Referenced by EmitHiLo(), getMetadataID(), llvm::MachineOperand::print(), and llvm::MachineMemOperand::print().
| void Metadata::printAsOperand | ( | raw_ostream & | OS, |
| ModuleSlotTracker & | MST, | ||
| const Module * | M = nullptr |
||
| ) | const |
Definition at line 4272 of file AsmWriter.cpp.
References printMetadataImpl().
|
friend |
Definition at line 59 of file Metadata.h.
Definition at line 72 of file Metadata.h.
Storage flag for non-uniqued, otherwise unowned, metadata.
Definition at line 69 of file Metadata.h.
Referenced by adjustColumn(), isCanonical(), llvm::MDNode::isDistinct(), isOperandUnresolved(), llvm::MDNode::isTemporary(), llvm::MDNode::isUniqued(), llvm::MDNode::replaceWithDistinct(), and llvm::MDNode::storeDistinctInContext().
|
protected |
Definition at line 74 of file Metadata.h.
|
protected |
Definition at line 75 of file Metadata.h.
Referenced by llvm::DistinctMDOperandPlaceholder::DistinctMDOperandPlaceholder(), llvm::MDTuple::getHash(), and llvm::DistinctMDOperandPlaceholder::getID().
1.8.13