LLVM
8.0.1
|
Shared implementation of use-lists for replaceable metadata. More...
#include "llvm/IR/Metadata.h"
Public Types | |
using | OwnerTy = MetadataTracking::OwnerTy |
Public Member Functions | |
ReplaceableMetadataImpl (LLVMContext &Context) | |
~ReplaceableMetadataImpl () | |
LLVMContext & | getContext () const |
void | replaceAllUsesWith (Metadata *MD) |
Replace all uses of this with MD. More... | |
void | resolveAllUses (bool ResolveUsers=true) |
Resolve all uses of this. More... | |
Friends | |
class | MetadataTracking |
Shared implementation of use-lists for replaceable metadata.
Most metadata cannot be RAUW'ed. This is a shared implementation of use-lists and associated API for the two that support it (ValueAsMetadata and TempMDNode).
Definition at line 279 of file Metadata.h.
Definition at line 283 of file Metadata.h.
|
inline |
Definition at line 291 of file Metadata.h.
|
inline |
Definition at line 293 of file Metadata.h.
References assert(), and llvm::DenseMapBase< SmallDenseMap< KeyT, ValueT, InlineBuckets, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::empty().
|
inline |
Definition at line 297 of file Metadata.h.
void ReplaceableMetadataImpl::replaceAllUsesWith | ( | Metadata * | MD | ) |
Replace all uses of this with MD.
Replace all uses of this with MD
, which is allowed to be null.
Definition at line 233 of file Metadata.cpp.
References assert(), llvm::PointerUnion< PT1, PT2 >::get(), llvm::Metadata::getMetadataID(), llvm::PointerUnion< PT1, PT2 >::is(), llvm_unreachable, llvm::Ref, llvm::sort(), and llvm::MetadataTracking::track().
Referenced by llvm::MDNode::dropAllReferences(), and llvm::ValueAsMetadata::replaceAllUsesWith().
Resolve all uses of this.
Resolve all uses of this, turning off RAUW permanently. If ResolveUsers
, call MDNode::resolve() on any users whose last operand is resolved.
Definition at line 281 of file Metadata.cpp.
References llvm::dyn_cast(), llvm::PointerUnion< PT1, PT2 >::get(), llvm::PointerUnion< PT1, PT2 >::is(), N, and llvm::sort().
Referenced by llvm::MDNode::dropAllReferences().
|
friend |
Definition at line 280 of file Metadata.h.