[#llvm-ValueAsMetadata] = xref:llvm.adoc[llvm]::ValueAsMetadata :relfileprefix: ../ :mrdocs: Value wrapper in the Metadata hierarchy. == Synopsis Declared in `<llvm/IR/Metadata.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class ValueAsMetadata : public xref:llvm/Metadata.adoc[Metadata] ---- == Description This is a custom value handle that allows other metadata to refer to classes in the Value hierarchy. Because of full uniquing support, each value is only wrapped by a single _ValueAsMetadata_ object, so the lookup maps are far more efficient than those using ValueHandleBase. == Base Classes [cols="1,4"] |=== | Name| Description | `xref:llvm/Metadata.adoc[Metadata]` | Root of the metadata hierarchy. |=== == Enums [cols="1,4"] |=== | Name| Description | xref:llvm/Metadata/MetadataKind.adoc[`MetadataKind`] | RTTI identifiers for concrete metadata subclasses. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/Metadata/dump-08.adoc[`dump`] | `dump` overloads | xref:llvm/ValueAsMetadata/getAllArgListUsers.adoc[`getAllArgListUsers`] | Return all `DIArgList` users of this replaceable metadata. | xref:llvm/ValueAsMetadata/getAllDbgVariableRecordUsers.adoc[`getAllDbgVariableRecordUsers`] | Return all `DbgVariableRecord` users of this replaceable metadata. | xref:llvm/ValueAsMetadata/getContext.adoc[`getContext`] | Return the LLVM context of the wrapped value. | xref:llvm/Metadata/getMetadataID.adoc[`getMetadataID`] | Return the metadata kind ID for this node. | xref:llvm/ValueAsMetadata/getType.adoc[`getType`] | Return the type of the wrapped IR value. | xref:llvm/ValueAsMetadata/getValue.adoc[`getValue`] | Return the wrapped IR value. | xref:llvm/Metadata/print-0c.adoc[`print`] | `print` overloads | xref:llvm/Metadata/printAsOperand-09e.adoc[`printAsOperand`] | `printAsOperand` overloads |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/ValueAsMetadata/classof.adoc[`classof`] | Methods for support type inquiry through isa, cast, and dyn_cast. | xref:llvm/ValueAsMetadata/get.adoc[`get`] | Create or return value‐as‐metadata wrapping `V.` | xref:llvm/ValueAsMetadata/getConstant.adoc[`getConstant`] | Return constant‐as‐metadata for constant value `C.` | xref:llvm/ValueAsMetadata/getConstantIfExists.adoc[`getConstantIfExists`] | Return existing constant‐as‐metadata for `C,` or null if none. | xref:llvm/ValueAsMetadata/getIfExists.adoc[`getIfExists`] | Return existing value‐as‐metadata for `V,` or null if none. | xref:llvm/ValueAsMetadata/getLocal.adoc[`getLocal`] | Return local‐as‐metadata wrapping a function‐local value. | xref:llvm/ValueAsMetadata/getLocalIfExists.adoc[`getLocalIfExists`] | Return local‐as‐metadata for `Local` if it already exists, else null. | xref:llvm/ValueAsMetadata/handleDeletion.adoc[`handleDeletion`] | Remove and delete `ValueAsMetadata` for `V` when `V` is destroyed. | xref:llvm/ValueAsMetadata/handleRAUW.adoc[`handleRAUW`] | Update metadata after `From` is RAUW'd to `To.` |=== == Static Data Members [cols="1,4"] |=== | Name| Description | xref:llvm/Metadata/PoisonGeneratingIDs.adoc[`PoisonGeneratingIDs`] | Metadata IDs that may generate poison. |=== == Protected Enums [cols="1,4"] |=== | Name| Description | xref:llvm/Metadata/StorageType.adoc[`StorageType`] | Active type of storage. |=== == Protected Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/ValueAsMetadata/2constructor.adoc[`ValueAsMetadata`] [.small]#[constructor]# | Construct value‐as‐metadata wrapping `V` with subclass ID `ID.` | xref:llvm/ValueAsMetadata/2destructor.adoc[`~ValueAsMetadata`] [.small]#[destructor]# | Destroy this value‐as‐metadata wrapper. | xref:llvm/Metadata/handleChangedOperand.adoc[`handleChangedOperand`] | Default handling of a changed operand, which asserts. | xref:llvm/ValueAsMetadata/replaceAllUsesWith.adoc[`replaceAllUsesWith`] | Handle collisions after _Value::replaceAllUsesWith()._ |=== == Protected Data Members [cols="1,4"] |=== | Name| Description | xref:llvm/Metadata/Storage.adoc[`Storage`] | Storage flag for non‐uniqued, otherwise unowned, metadata. | xref:llvm/Metadata/SubclassData1.adoc[`SubclassData1`] | One bit of subclass‐specific state packed into the metadata header. | xref:llvm/Metadata/SubclassData16.adoc[`SubclassData16`] | Sixteen bits of subclass‐specific state packed into the metadata header. | xref:llvm/Metadata/SubclassData32.adoc[`SubclassData32`] | Thirty‐two bits of subclass‐specific state packed into the metadata header. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:llvm/LLVMContextImpl.adoc[llvm::LLVMContextImpl]` | Private implementation details of `LLVMContext.` | `xref:llvm/ReplaceableMetadataImpl.adoc[llvm::ReplaceableMetadataImpl]` | Shared implementation of use‐lists for replaceable metadata. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/MapMetadata-00.adoc[`MapMetadata`] | Lookup or compute a mapping for a piece of metadata. | xref:llvm/wrap-057.adoc[`wrap`] | Wrap a `Metadata` pointer as an opaque `LLVMMetadataRef.` |=== == Derived Classes [cols="1,4"] |=== | Name| Description | xref:llvm/ConstantAsMetadata.adoc[`ConstantAsMetadata`] | Metadata wrapping a constant IR value. | xref:llvm/LocalAsMetadata.adoc[`LocalAsMetadata`] | Metadata wrapping a function‐local (non‐constant) IR value. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#