LLVM 17.0.0git
|
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. | |
SmallVector< Metadata * > | getAllArgListUsers () |
Returns the list of all DIArgList users of this. | |
void | resolveAllUses (bool ResolveUsers=true) |
Resolve all uses of this. | |
Static Public Member Functions | |
static void | SalvageDebugInfo (const Constant &C) |
Replace all uses of the constant with Undef in debug info metadata. | |
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 280 of file Metadata.h.
Definition at line 284 of file Metadata.h.
|
inline |
Definition at line 292 of file Metadata.h.
References Context.
|
inline |
Definition at line 294 of file Metadata.h.
References assert(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::empty().
SmallVector< Metadata * > ReplaceableMetadataImpl::getAllArgListUsers | ( | ) |
Returns the list of all DIArgList users of this.
Definition at line 194 of file Metadata.cpp.
References llvm::Metadata::getMetadataID(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::sort().
Referenced by llvm::ValueAsMetadata::getAllArgListUsers().
|
inline |
Definition at line 298 of file Metadata.h.
References Context.
Referenced by llvm::ContextAndReplaceableUses::getContext().
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 278 of file Metadata.cpp.
References assert(), llvm::Metadata::getMetadataID(), llvm_unreachable, llvm::Ref, llvm::sort(), llvm::MetadataTracking::track(), and Uses.
Referenced by 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 326 of file Metadata.cpp.
References llvm::sort(), and Uses.
Replace all uses of the constant with Undef in debug info metadata.
Definition at line 248 of file Metadata.cpp.
References llvm::CallingConv::C, Context, llvm::UndefValue::get(), llvm::ValueAsMetadata::get(), I, llvm::LLVMContext::pImpl, Uses, and llvm::LLVMContextImpl::ValuesAsMetadata.
Referenced by constantIsDead().
|
friend |
Definition at line 281 of file Metadata.h.