class MetadataTracking
Declaration
class MetadataTracking { /* full declaration omitted */ };
Description
API for tracking metadata references through RAUW and deletion. Shared API for updating \a Metadata pointers in subclasses that support RAUW. This API is not meant to be used directly. See \a TrackingMDRef for a user-friendly tracking reference.
Declared at: llvm/include/llvm/IR/Metadata.h:212
Method Overview
- public static bool isReplaceable(const llvm::Metadata & MD)
- public static bool retrack(llvm::Metadata *& MD, llvm::Metadata *& New)
- public static bool retrack(void * Ref, llvm::Metadata & MD, void * New)
- public static bool track(llvm::Metadata *& MD)
- public static bool track(void * Ref, llvm::Metadata & MD, llvm::Metadata & Owner)
- public static bool track(void * Ref, llvm::Metadata & MD, llvm::MetadataAsValue & Owner)
- private static bool track(void * Ref, llvm::Metadata & MD, llvm::MetadataTracking::OwnerTy Owner)
- public static void untrack(llvm::Metadata *& MD)
- public static void untrack(void * Ref, llvm::Metadata & MD)
Methods
¶static bool isReplaceable(
const llvm::Metadata& MD)
static bool isReplaceable(
const llvm::Metadata& MD)
Description
Check whether metadata is replaceable.
Declared at: llvm/include/llvm/IR/Metadata.h:265
Parameters
- const llvm::Metadata& MD
¶static bool retrack(llvm::Metadata*& MD,
llvm::Metadata*& New)
static bool retrack(llvm::Metadata*& MD,
llvm::Metadata*& New)
Description
Move tracking from one reference to another. Semantically equivalent to \c untrack(MD) followed by \c track(New), except that ownership callbacks are maintained. Note: it is an error if \c *MD does not equal \c New.
Declared at: llvm/include/llvm/IR/Metadata.h:259
Parameters
- llvm::Metadata*& MD
- llvm::Metadata*& New
Returns
true iff tracking is supported by \c MD.
¶static bool retrack(void* Ref,
llvm::Metadata& MD,
void* New)
static bool retrack(void* Ref,
llvm::Metadata& MD,
void* New)
Declared at: llvm/include/llvm/IR/Metadata.h:262
Parameters
- void* Ref
- llvm::Metadata& MD
- void* New
¶static bool track(llvm::Metadata*& MD)
static bool track(llvm::Metadata*& MD)
Description
Track the reference to metadata. Register \c MD with \c *MD, if the subclass supports tracking. If \c *MD gets RAUW'ed, \c MD will be updated to the new address. If \c *MD gets deleted, \c MD will be set to \c nullptr. If tracking isn't supported, \c *MD will not change.
Declared at: llvm/include/llvm/IR/Metadata.h:223
Parameters
- llvm::Metadata*& MD
Returns
true iff tracking is supported by \c MD.
¶static bool track(void* Ref,
llvm::Metadata& MD,
llvm::Metadata& Owner)
static bool track(void* Ref,
llvm::Metadata& MD,
llvm::Metadata& Owner)
Description
Track the reference to metadata for \a Metadata. As \a track(Metadata*&), but with support for calling back to \c Owner to tell it that its operand changed. This could trigger \c Owner being re-uniqued.
Declared at: llvm/include/llvm/IR/Metadata.h:232
Parameters
- void* Ref
- llvm::Metadata& MD
- llvm::Metadata& Owner
¶static bool track(void* Ref,
llvm::Metadata& MD,
llvm::MetadataAsValue& Owner)
static bool track(void* Ref,
llvm::Metadata& MD,
llvm::MetadataAsValue& Owner)
Description
Track the reference to metadata for \a MetadataAsValue. As \a track(Metadata*&), but with support for calling back to \c Owner to tell it that its operand changed. This could trigger \c Owner being re-uniqued.
Declared at: llvm/include/llvm/IR/Metadata.h:241
Parameters
- void* Ref
- llvm::Metadata& MD
- llvm::MetadataAsValue& Owner
¶static bool track(
void* Ref,
llvm::Metadata& MD,
llvm::MetadataTracking::OwnerTy Owner)
static bool track(
void* Ref,
llvm::Metadata& MD,
llvm::MetadataTracking::OwnerTy Owner)
Description
Track a reference to metadata for an owner. Generalized version of tracking.
Declared at: llvm/include/llvm/IR/Metadata.h:273
Parameters
- void* Ref
- llvm::Metadata& MD
- llvm::MetadataTracking::OwnerTy Owner
¶static void untrack(llvm::Metadata*& MD)
static void untrack(llvm::Metadata*& MD)
Description
Stop tracking a reference to metadata. Stops \c *MD from tracking \c MD.
Declared at: llvm/include/llvm/IR/Metadata.h:248
Parameters
- llvm::Metadata*& MD
¶static void untrack(void* Ref, llvm::Metadata& MD)
static void untrack(void* Ref, llvm::Metadata& MD)
Declared at: llvm/include/llvm/IR/Metadata.h:249
Parameters
- void* Ref
- llvm::Metadata& MD