LLVM  6.0.0svn
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Friends | List of all members
llvm::MDNode Class Reference

Metadata node. More...

#include "llvm/IR/Metadata.h"

Inheritance diagram for llvm::MDNode:
Inheritance graph
[legend]
Collaboration diagram for llvm::MDNode:
Collaboration graph
[legend]

Classes

struct  HasCachedHash
 

Public Types

using op_iterator = const MDOperand *
 
using op_range = iterator_range< op_iterator >
 

Public Member Functions

 MDNode (const MDNode &)=delete
 
void operator= (const MDNode &)=delete
 
void * operator new (size_t)=delete
 
TempMDNode clone () const
 Create a (temporary) clone of this. More...
 
LLVMContextgetContext () const
 
void replaceOperandWith (unsigned I, Metadata *New)
 Replace a specific operand. More...
 
bool isResolved () const
 Check if node is fully resolved. More...
 
bool isUniqued () const
 
bool isDistinct () const
 
bool isTemporary () const
 
void replaceAllUsesWith (Metadata *MD)
 RAUW a temporary. More...
 
void resolveCycles ()
 Resolve cycles. More...
 
op_iterator op_begin () const
 
op_iterator op_end () const
 
op_range operands () const
 
const MDOperandgetOperand (unsigned I) const
 
unsigned getNumOperands () const
 Return number of MDNode operands. More...
 
bool isTBAAVtableAccess () const
 Check whether MDNode is a vtable access. More...
 

Static Public Member Functions

static MDTupleget (LLVMContext &Context, ArrayRef< Metadata *> MDs)
 
static MDTuplegetIfExists (LLVMContext &Context, ArrayRef< Metadata *> MDs)
 
static MDTuplegetDistinct (LLVMContext &Context, ArrayRef< Metadata *> MDs)
 
static TempMDTuple getTemporary (LLVMContext &Context, ArrayRef< Metadata *> MDs)
 
static void deleteTemporary (MDNode *N)
 Deallocate a node created by getTemporary. More...
 
template<class T >
static std::enable_if< std::is_base_of< MDNode, T >::value, T * >::type replaceWithPermanent (std::unique_ptr< T, TempMDNodeDeleter > N)
 Replace a temporary node with a permanent one. More...
 
template<class T >
static std::enable_if< std::is_base_of< MDNode, T >::value, T * >::type replaceWithUniqued (std::unique_ptr< T, TempMDNodeDeleter > N)
 Replace a temporary node with a uniqued one. More...
 
template<class T >
static std::enable_if< std::is_base_of< MDNode, T >::value, T * >::type replaceWithDistinct (std::unique_ptr< T, TempMDNodeDeleter > N)
 Replace a temporary node with a distinct one. More...
 
static bool classof (const Metadata *MD)
 Methods for support type inquiry through isa, cast, and dyn_cast: More...
 
static MDNodeconcatenate (MDNode *A, MDNode *B)
 Methods for metadata merging. More...
 
static MDNodeintersect (MDNode *A, MDNode *B)
 
static MDNodegetMostGenericTBAA (MDNode *A, MDNode *B)
 
static MDNodegetMostGenericFPMath (MDNode *A, MDNode *B)
 
static MDNodegetMostGenericRange (MDNode *A, MDNode *B)
 
static MDNodegetMostGenericAliasScope (MDNode *A, MDNode *B)
 
static MDNodegetMostGenericAlignmentOrDereferenceable (MDNode *A, MDNode *B)
 

Protected Types

using mutable_op_range = iterator_range< MDOperand * >
 
 Active type of storage. More...

Protected Member Functions

 MDNode (LLVMContext &Context, unsigned ID, StorageType Storage, ArrayRef< Metadata *> Ops1, ArrayRef< Metadata *> Ops2=None)
 
 ~MDNode ()=default
 
void * operator new (size_t Size, unsigned NumOps)
 
void operator delete (void *Mem)
 
void operator delete (void *, unsigned)
 Required by std, but never called. More...
 
void operator delete (void *, unsigned, bool)
 Required by std, but never called. More...
 
void dropAllReferences ()
 
MDOperandmutable_begin ()
 
MDOperandmutable_end ()
 
mutable_op_range mutable_operands ()
 
void setOperand (unsigned I, Metadata *New)
 Set an operand. More...
 
void storeDistinctInContext ()
 

Static Protected Member Functions

template<class T , class StoreT >
static TstoreImpl (T *N, StorageType Storage, StoreT &Store)
 
template<class T >
static TstoreImpl (T *N, StorageType Storage)
 

Friends

class ReplaceableMetadataImpl
 
class LLVMContextImpl
 

Additional Inherited Members

Detailed Description

Metadata node.

Metadata nodes can be uniqued, like constants, or distinct. Temporary metadata nodes (with full support for RAUW) can be used to delay uniquing until forward references are known. The basic metadata node is an MDTuple.

There is limited support for RAUW at construction time. At construction time, if any operand is a temporary node (or an unresolved uniqued node, which indicates a transitive temporary operand), the node itself will be unresolved. As soon as all operands become resolved, it will drop RAUW support permanently.

If an unresolved node is part of a cycle, resolveCycles() needs to be called on some member of the cycle once all temporary nodes have been replaced.

Definition at line 862 of file Metadata.h.

Member Typedef Documentation

◆ mutable_op_range

Definition at line 894 of file Metadata.h.

◆ op_iterator

Definition at line 1054 of file Metadata.h.

◆ op_range

Definition at line 1055 of file Metadata.h.

Constructor & Destructor Documentation

◆ MDNode() [1/2]

MDNode::MDNode ( LLVMContext Context,
unsigned  ID,
StorageType  Storage,
ArrayRef< Metadata *>  Ops1,
ArrayRef< Metadata *>  Ops2 = None 
)
protected

Definition at line 496 of file Metadata.cpp.

References isUniqued(), and setOperand().

◆ ~MDNode()

llvm::MDNode::~MDNode ( )
protecteddefault

◆ MDNode() [2/2]

llvm::MDNode::MDNode ( const MDNode )
delete

Member Function Documentation

◆ classof()

static bool llvm::MDNode::classof ( const Metadata MD)
inlinestatic

Methods for support type inquiry through isa, cast, and dyn_cast:

Definition at line 1076 of file Metadata.h.

References A, B, llvm::Metadata::getMetadataID(), and intersect().

◆ clone()

TempMDNode MDNode::clone ( ) const

Create a (temporary) clone of this.

Definition at line 514 of file Metadata.cpp.

References llvm::Metadata::getMetadataID(), and llvm_unreachable.

Referenced by llvm::DIType::clone(), and wrapConstantAsMetadata().

◆ concatenate()

MDNode * MDNode::concatenate ( MDNode A,
MDNode B 
)
static

◆ deleteTemporary()

void MDNode::deleteTemporary ( MDNode N)
static

Deallocate a node created by getTemporary.

Calls replaceAllUsesWith(nullptr) before deleting, so any remaining references will be reset.

Definition at line 823 of file Metadata.cpp.

References assert(), isTemporary(), and replaceAllUsesWith().

Referenced by llvm::TempMDNodeDeleter::operator()().

◆ dropAllReferences()

void MDNode::dropAllReferences ( )
protected

◆ get()

MDTuple * llvm::MDNode::get ( LLVMContext Context,
ArrayRef< Metadata *>  MDs 
)
inlinestatic

Definition at line 1164 of file Metadata.h.

References llvm::MDTuple::get().

Referenced by AddAliasScopeMetadata(), llvm::Module::addModuleFlag(), AddRuntimeUnrollDisableMetaData(), llvm::addStringMetadataToLoop(), llvm::LoopVersioning::annotateInstWithNoAlias(), llvm::annotateValueSite(), buildMUBUFOffsetLoadStore(), CanBeSMin(), canonicalizeMetadataForValue(), CloneAliasScopeMetadata(), CloneLoopBlocks(), llvm::DILocation::cloneWithDiscriminator(), llvm::GlobalObject::copyMetadata(), llvm::copyRangeMetadata(), llvm::MDBuilder::createAliasScope(), llvm::MDBuilder::createAliasScopeDomain(), llvm::MDBuilder::createAnonymousAARoot(), llvm::DIBuilder::createArrayType(), llvm::DIBuilder::createBasicType(), llvm::DIBuilder::createBitFieldMemberType(), llvm::MDBuilder::createBranchWeights(), llvm::DIBuilder::createClassType(), llvm::DIBuilder::createConstantValueExpression(), llvm::DIBuilder::createEnumerationType(), llvm::DIBuilder::createEnumerator(), llvm::DIBuilder::createExpression(), llvm::createFalkorMarkStridedAccessesPass(), llvm::DIBuilder::createFile(), llvm::DIBuilder::createForwardDecl(), llvm::MDBuilder::createFPMath(), llvm::DIBuilder::createFragmentExpression(), llvm::DIBuilder::createFriend(), llvm::MDBuilder::createFunctionEntryCount(), llvm::MDBuilder::createFunctionSectionPrefix(), llvm::DIBuilder::createGlobalVariableExpression(), createImportedModule(), llvm::DIBuilder::createInheritance(), llvm::DIBuilder::createLexicalBlockFile(), createLocalVariable(), llvm::DIBuilder::createMacro(), llvm::DIBuilder::createMemberPointerType(), llvm::DIBuilder::createMemberType(), createMissedAnalysis(), llvm::DIBuilder::createModule(), llvm::DIBuilder::createNameSpace(), llvm::createObjCARCOptPass(), llvm::DIBuilder::createObjCIVar(), llvm::DIBuilder::createObjCProperty(), llvm::createPGOFuncNameMetadata(), llvm::DIBuilder::createPointerType(), llvm::DIBuilder::createQualifiedType(), llvm::MDBuilder::createRange(), llvm::DIBuilder::createReferenceType(), llvm::createSILowerI1CopiesPass(), llvm::DIBuilder::createStaticMemberType(), createStringMetadata(), llvm::DIBuilder::createStructType(), llvm::DIBuilder::createSubroutineType(), llvm::MDBuilder::createTBAANode(), llvm::MDBuilder::createTBAARoot(), llvm::MDBuilder::createTBAAScalarTypeNode(), llvm::MDBuilder::createTBAAStructNode(), llvm::MDBuilder::createTBAAStructTagNode(), llvm::MDBuilder::createTBAAStructTypeNode(), llvm::DIBuilder::createTemplateParameterPack(), llvm::DIBuilder::createTemplateTypeParameter(), createTemplateValueParameterHelper(), llvm::DIBuilder::createTypedef(), llvm::DIBuilder::createUnionType(), llvm::MDBuilder::createUnpredictable(), llvm::DIBuilder::createUnspecifiedType(), llvm::DIBuilder::createVectorType(), DisableAllLoopOptsOnLoop(), llvm::SIRegisterInfo::eliminateFrameIndex(), llvm::SIFrameLowering::emitEntryFunctionPrologue(), llvm::SIFrameLowering::emitEpilogue(), llvm::SIFrameLowering::emitPrologue(), llvm::SystemZFrameLowering::emitPrologue(), extractMDNode(), llvm::DIBuilder::finalize(), llvm::DIBuilder::finalizeSubprogram(), findBasePointer(), foldCtpop(), foldCttzCtlz(), llvm::DebugLoc::get(), getArrayElements(), getMostGenericRange(), getMostGenericTBAA(), getNewValueJumpOpcode(), llvm::DIBuilder::getOrCreateSubrange(), llvm::DIBuilder::getOrCreateTypeArray(), getOrSelfReference(), getSubprogram(), hasOnlyUniformBranches(), llvm::FunctionImporter::importFunctions(), INITIALIZE_PASS(), instrumentMaskedLoadOrStore(), isImplicitOperandIn(), isKnownTypeIdMember(), LLVMMDNodeInContext(), lowerVECTOR_SHUFFLE_VSHF(), llvm::SIRegisterInfo::materializeFrameBaseRegister(), llvm::MetadataLoader::MetadataLoaderImpl::parseMetadata(), llvm::LLParser::parseTypeAtBeginning(), llvm::LoopVersioning::prepareNoAliasMetadata(), llvm::DIExpression::prepend(), llvm::SIFrameLowering::processFunctionBeforeFrameFinalized(), PushArgMD(), llvm::ARMTargetLowering::ReplaceNodeResults(), llvm::DIBuilder::replaceTemporary(), llvm::SIRegisterInfo::restoreSGPR(), rotateSign(), llvm::WholeProgramDevirtPass::run(), SetLoopAlreadyUnrolled(), setNoClobberMetadata(), setUniformMetadata(), shrinkScalarCompare(), llvm::SIRegisterInfo::spillSGPR(), llvm::StripDebugInfo(), stripDebugLocFromLoopID(), llvm::Instruction::swapProfMetadata(), llvm::Instruction::updateProfWeight(), llvm::UpgradeIntrinsicCall(), llvm::UpgradeTBAANode(), and llvm::InstCombiner::visitCallInst().

◆ getContext()

LLVMContext& llvm::MDNode::getContext ( ) const
inline

◆ getDistinct()

MDTuple * llvm::MDNode::getDistinct ( LLVMContext Context,
ArrayRef< Metadata *>  MDs 
)
inlinestatic

◆ getIfExists()

MDTuple * llvm::MDNode::getIfExists ( LLVMContext Context,
ArrayRef< Metadata *>  MDs 
)
inlinestatic

Definition at line 1168 of file Metadata.h.

References llvm::MDTuple::getIfExists().

◆ getMostGenericAliasScope()

MDNode * MDNode::getMostGenericAliasScope ( MDNode A,
MDNode B 
)
static

◆ getMostGenericAlignmentOrDereferenceable()

MDNode * MDNode::getMostGenericAlignmentOrDereferenceable ( MDNode A,
MDNode B 
)
static

Definition at line 1042 of file Metadata.cpp.

References B, getOperand(), and llvm::ConstantInt::getZExtValue().

Referenced by llvm::combineMetadata().

◆ getMostGenericFPMath()

MDNode * MDNode::getMostGenericFPMath ( MDNode A,
MDNode B 
)
static

◆ getMostGenericRange()

MDNode * MDNode::getMostGenericRange ( MDNode A,
MDNode B 
)
static

◆ getMostGenericTBAA()

MDNode * MDNode::getMostGenericTBAA ( MDNode A,
MDNode B 
)
static

◆ getNumOperands()

unsigned llvm::MDNode::getNumOperands ( ) const
inline

Return number of MDNode operands.

Definition at line 1073 of file Metadata.h.

Referenced by llvm::Module::addModuleFlag(), AddRuntimeUnrollDisableMetaData(), llvm::addStringMetadataToLoop(), llvm::cacheAnnotationFromMD(), llvm::TypeFinder::clear(), CloneAliasScopeMetadata(), CloneLoopBlocks(), llvm::FunctionComparator::cmpMem(), llvm::MDNodeOpsKey::compareOps(), llvm::computeKnownBitsFromRangeMetadata(), llvm::ConstantFoldTerminator(), createMissedAnalysis(), llvm::createObjCARCContractPass(), dropAllReferences(), llvm::MachineInstr::emitError(), EmitGCCInlineAsmStr(), llvm::AsmPrinter::EmitSpecialLLVMGlobal(), llvm::MDTupleTypedArrayWrapper< T >::empty(), llvm::findStringMetadataForLoop(), getArrayElements(), GetBranchWeights(), llvm::getConstantRangeFromMetadata(), llvm::DOTGraphTraits< const Function * >::getEdgeAttributes(), llvm::ProfileSummary::getFromMD(), GetFunctionFromMDNode(), getFunctionName(), getHiPELiteral(), llvm::Loop::getLoopID(), getMostGenericRange(), getMostGenericTBAA(), llvm::NamedMDNode::getOperand(), getOptimizationFlags(), getParentPad(), getSummaryFromMD(), llvm::GetUnrollMetadata(), getVal(), llvm::getValueProfDataFromInst(), hasConflictingReferenceFlags(), isContiguous(), isFuncOrArgAttr(), isKeyValuePair(), isKnownTypeIdMember(), IsRootTBAANode(), IsScalarTBAANodeImpl(), isStructPathTBAA(), llvm::LTOModule::makeBuffer(), llvm::DebugInfoFinder::processValue(), rangeMetadataExcludesValue(), SetLoopAlreadyUnrolled(), llvm::Loop::setLoopID(), llvm::NamedMDNode::setOperand(), llvm::DITypeRefArray::size(), llvm::MDTupleTypedArrayWrapper< T >::size(), srcMgrDiagHandler(), llvm::StripDebugInfo(), llvm::Instruction::swapProfMetadata(), UnrollCountPragmaValue(), llvm::UpgradeModuleFlags(), llvm::UpgradeTBAANode(), ValuesOverlap(), llvm::TBAAVerifier::visitTBAAMetadata(), and wrapConstantAsMetadata().

◆ getOperand()

const MDOperand& llvm::MDNode::getOperand ( unsigned  I) const
inline

Definition at line 1067 of file Metadata.h.

References assert(), and I.

Referenced by AccessQualFromMD(), llvm::Module::addModuleFlag(), AddRuntimeUnrollDisableMetaData(), llvm::addStringMetadataToLoop(), ArgTypeFromMD(), llvm::cacheAnnotationFromMD(), llvm::TypeFinder::clear(), CloneAliasScopeMetadata(), CloneLoopBlocks(), llvm::FunctionComparator::cmpMem(), llvm::computeKnownBitsFromRangeMetadata(), llvm::ConstantFoldTerminator(), createMissedAnalysis(), llvm::createObjCARCContractPass(), dropAllReferences(), llvm::MachineInstr::emitError(), EmitGCCInlineAsmStr(), llvm::AsmPrinter::EmitSpecialLLVMGlobal(), llvm::findStringMetadataForLoop(), getARClassRegisterMask(), GetArgMD(), getArrayElements(), getAssociatedSymbol(), GetBranchWeights(), llvm::getConstantRangeFromMetadata(), llvm::DOTGraphTraits< const Function * >::getEdgeAttributes(), llvm::Function::getEntryCount(), llvm::FPMathOperator::getFPAccuracy(), llvm::ProfileSummary::getFromMD(), GetFunctionFromMDNode(), getFunctionName(), getHiPELiteral(), getIntOperandFromRegisterString(), llvm::Loop::getLoopID(), getMDNodeOperandImpl(), getMostGenericAlignmentOrDereferenceable(), getMostGenericFPMath(), getMostGenericRange(), getOptimizationFlags(), getParentPad(), getSummaryFromMD(), llvm::GetUnrollMetadata(), getVal(), llvm::getValueProfDataFromInst(), HasBranchWeights(), hasConflictingReferenceFlags(), isContiguous(), isFuncOrArgAttr(), isKeyValuePair(), isKnownTypeIdMember(), llvm::SelectionDAGISel::IsLegalToFold(), IsScalarTBAANodeImpl(), isStructPathTBAA(), isTBAAVtableAccess(), llvm::LTOModule::makeBuffer(), llvm::DITypeRefArray::operator[](), llvm::MDTupleTypedArrayWrapper< T >::operator[](), rangeMetadataExcludesValue(), replaceOperandWith(), SetLoopAlreadyUnrolled(), llvm::Loop::setLoopID(), srcMgrDiagHandler(), llvm::Instruction::swapProfMetadata(), UnrollCountPragmaValue(), llvm::UpgradeModuleFlags(), llvm::UpgradeTBAANode(), ValuesOverlap(), llvm::TBAAVerifier::visitTBAAMetadata(), and wrapConstantAsMetadata().

◆ getTemporary()

TempMDTuple llvm::MDNode::getTemporary ( LLVMContext Context,
ArrayRef< Metadata *>  MDs 
)
inlinestatic

◆ intersect()

MDNode * MDNode::intersect ( MDNode A,
MDNode B 
)
static

◆ isDistinct()

bool llvm::MDNode::isDistinct ( ) const
inline

◆ isResolved()

bool llvm::MDNode::isResolved ( ) const
inline

Check if node is fully resolved.

If isTemporary(), this always returns false; if isDistinct(), this always returns true.

If isUniqued(), returns true if this has already dropped RAUW support (because all operands are resolved).

As forward declarations are resolved, their containers should get resolved automatically. However, if this (or one of its operands) is involved in a cycle, resolveCycles() needs to be called explicitly.

Definition at line 938 of file Metadata.h.

Referenced by llvm::DIBuilder::DIBuilder(), dropAllReferences(), llvm::DIBuilder::finalize(), forEachUser(), isOperandUnresolved(), llvm::LexicalScope::LexicalScope(), llvm::DIBuilder::replaceArrays(), llvm::DIBuilder::replaceVTableHolder(), resolveCycles(), storeDistinctInContext(), and wrapConstantAsMetadata().

◆ isTBAAVtableAccess()

bool MDNode::isTBAAVtableAccess ( ) const

Check whether MDNode is a vtable access.

Definition at line 388 of file TypeBasedAliasAnalysis.cpp.

References getOperand(), and isStructPathTBAA().

◆ isTemporary()

bool llvm::MDNode::isTemporary ( ) const
inline

◆ isUniqued()

bool llvm::MDNode::isUniqued ( ) const
inline

◆ mutable_begin()

MDOperand* llvm::MDNode::mutable_begin ( )
inlineprotected

Definition at line 891 of file Metadata.h.

Referenced by replaceOperandWith(), and setOperand().

◆ mutable_end()

MDOperand* llvm::MDNode::mutable_end ( )
inlineprotected

Definition at line 892 of file Metadata.h.

◆ mutable_operands()

mutable_op_range llvm::MDNode::mutable_operands ( )
inlineprotected

Definition at line 896 of file Metadata.h.

References Context, and N.

Referenced by isOperandUnresolved().

◆ op_begin()

op_iterator llvm::MDNode::op_begin ( ) const
inline

◆ op_end()

op_iterator llvm::MDNode::op_end ( ) const
inline

◆ operands()

op_range llvm::MDNode::operands ( ) const
inline

◆ operator delete() [1/3]

void MDNode::operator delete ( void *  Mem)
protected

Definition at line 485 of file Metadata.cpp.

References llvm::alignTo(), E, and N.

◆ operator delete() [2/3]

void llvm::MDNode::operator delete ( void *  ,
unsigned   
)
inlineprotected

Required by std, but never called.

Definition at line 880 of file Metadata.h.

References llvm_unreachable.

◆ operator delete() [3/3]

void llvm::MDNode::operator delete ( void *  ,
unsigned  ,
bool   
)
inlineprotected

Required by std, but never called.

Definition at line 885 of file Metadata.h.

References llvm_unreachable.

◆ operator new() [1/2]

void * MDNode::operator new ( size_t  Size,
unsigned  NumOps 
)
protected

◆ operator new() [2/2]

void* llvm::MDNode::operator new ( size_t  )
delete

◆ operator=()

void llvm::MDNode::operator= ( const MDNode )
delete

◆ replaceAllUsesWith()

void llvm::MDNode::replaceAllUsesWith ( Metadata MD)
inline

RAUW a temporary.

Precondition
isTemporary() must be true.

Definition at line 947 of file Metadata.h.

References assert().

Referenced by deleteTemporary(), hasSelfReference(), and llvm::DIBuilder::replaceTemporary().

◆ replaceOperandWith()

void MDNode::replaceOperandWith ( unsigned  I,
Metadata New 
)

◆ replaceWithDistinct()

template<class T >
static std::enable_if<std::is_base_of<MDNode, T>::value, T *>::type llvm::MDNode::replaceWithDistinct ( std::unique_ptr< T, TempMDNodeDeleter N)
inlinestatic

Replace a temporary node with a distinct one.

Create a distinct version of N – in place, if possible – and return it. Takes ownership of the temporary node.

Definition at line 989 of file Metadata.h.

References llvm::Metadata::handleChangedOperand(), llvm::Metadata::Storage, and llvm::SPII::Store.

◆ replaceWithPermanent()

template<class T >
static std::enable_if<std::is_base_of<MDNode, T>::value, T *>::type llvm::MDNode::replaceWithPermanent ( std::unique_ptr< T, TempMDNodeDeleter N)
inlinestatic

Replace a temporary node with a permanent one.

Try to create a uniqued version of N – in place, if possible – and return it. If N cannot be uniqued, return a distinct node instead.

Definition at line 967 of file Metadata.h.

◆ replaceWithUniqued()

template<class T >
static std::enable_if<std::is_base_of<MDNode, T>::value, T *>::type llvm::MDNode::replaceWithUniqued ( std::unique_ptr< T, TempMDNodeDeleter N)
inlinestatic

Replace a temporary node with a uniqued one.

Create a uniqued version of N – in place, if possible – and return it. Takes ownership of the temporary node.

Precondition
N does not self-reference.

Definition at line 979 of file Metadata.h.

Referenced by createTypeWithFlags(), llvm::DIBuilder::replaceTemporary(), and wrapConstantAsMetadata().

◆ resolveCycles()

void MDNode::resolveCycles ( )

Resolve cycles.

Once all forward declarations have been resolved, force cycles to be resolved.

Precondition
No operands (or operands' operands, etc.) have isTemporary().

Definition at line 613 of file Metadata.cpp.

References assert(), isResolved(), N, and operands().

Referenced by llvm::DIBuilder::finalize(), and wrapConstantAsMetadata().

◆ setOperand()

void MDNode::setOperand ( unsigned  I,
Metadata New 
)
protected

Set an operand.

Sets the operand directly, without worrying about uniquing.

Definition at line 863 of file Metadata.cpp.

References assert(), I, isUniqued(), mutable_begin(), and llvm::MDOperand::reset().

Referenced by dropAllReferences(), MDNode(), replaceOperandWith(), and llvm::salvageDebugInfo().

◆ storeDistinctInContext()

void MDNode::storeDistinctInContext ( )
protected

◆ storeImpl() [1/2]

template<class T , class StoreT >
T * llvm::MDNode::storeImpl ( T N,
StorageType  Storage,
StoreT &  Store 
)
staticprotected

◆ storeImpl() [2/2]

template<class T >
T * llvm::MDNode::storeImpl ( T N,
StorageType  Storage 
)
staticprotected

Friends And Related Function Documentation

◆ LLVMContextImpl

friend class LLVMContextImpl
friend

Definition at line 864 of file Metadata.h.

◆ ReplaceableMetadataImpl

friend class ReplaceableMetadataImpl
friend

Definition at line 863 of file Metadata.h.


The documentation for this class was generated from the following files: