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:210
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)
- 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:263
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:257
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:260
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:221
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:230
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:239
Parameters
- void* Ref
- llvm::Metadata& MD
- llvm::MetadataAsValue& 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:246
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:247
Parameters
- void* Ref
- llvm::Metadata& MD