|
LLVM
4.0.0
|
API for tracking metadata references through RAUW and deletion. More...
#include <Metadata.h>
Public Types | |
| typedef PointerUnion < MetadataAsValue *, Metadata * > | OwnerTy |
Static Public Member Functions | |
| static bool | track (Metadata *&MD) |
| Track the reference to metadata. More... | |
| static bool | track (void *Ref, Metadata &MD, Metadata &Owner) |
| Track the reference to metadata for Metadata. More... | |
| static bool | track (void *Ref, Metadata &MD, MetadataAsValue &Owner) |
| Track the reference to metadata for MetadataAsValue. More... | |
| static void | untrack (Metadata *&MD) |
| Stop tracking a reference to metadata. More... | |
| static void | untrack (void *Ref, Metadata &MD) |
| static bool | retrack (Metadata *&MD, Metadata *&New) |
| Move tracking from one reference to another. More... | |
| static bool | retrack (void *Ref, Metadata &MD, void *New) |
| static bool | isReplaceable (const Metadata &MD) |
| Check whether metadata is replaceable. More... | |
API for tracking metadata references through RAUW and deletion.
Shared API for updating Metadata pointers in subclasses that support RAUW.
This API is not meant to be used directly. See TrackingMDRef for a user-friendly tracking reference.
Definition at line 195 of file Metadata.h.
| typedef PointerUnion<MetadataAsValue *, Metadata *> llvm::MetadataTracking::OwnerTy |
Definition at line 250 of file Metadata.h.
Check whether metadata is replaceable.
Definition at line 162 of file Metadata.cpp.
Referenced by llvm::TrackingMDRef::hasTrivialDestructor(), and retrack().
Move tracking from one reference to another.
Semantically equivalent to untrack(MD) followed by track(New), except that ownership callbacks are maintained.
Note: it is an error if *MD does not equal New.
MD. Definition at line 242 of file Metadata.h.
Definition at line 147 of file Metadata.cpp.
References assert(), and isReplaceable().
Track the reference to metadata.
Register MD with *MD, if the subclass supports tracking. If *MD gets RAUW'ed, MD will be updated to the new address. If *MD gets deleted, MD will be set to nullptr.
If tracking isn't supported, *MD will not change.
MD. Definition at line 206 of file Metadata.h.
Referenced by llvm::ReplaceableMetadataImpl::replaceAllUsesWith(), and track().
|
inlinestatic |
Track the reference to metadata for Metadata.
As track(Metadata*&), but with support for calling back to Owner to tell it that its operand changed. This could trigger Owner being re-uniqued.
Definition at line 215 of file Metadata.h.
References track().
|
inlinestatic |
Track the reference to metadata for MetadataAsValue.
As track(Metadata*&), but with support for calling back to Owner to tell it that its operand changed. This could trigger Owner being re-uniqued.
Definition at line 224 of file Metadata.h.
References track().
|
inlinestatic |
Stop tracking a reference to metadata.
Stops *MD from tracking MD.
Definition at line 231 of file Metadata.h.
References untrack().
Referenced by untrack().
|
static |
Definition at line 139 of file Metadata.cpp.
References assert().
1.8.6