llvm::MapMetadata

Version of MapMetadata with type safety for MDNode.

Synopsis

Declared in <llvm/Transforms/Utils/ValueMapper.h>

MDNode*
MapMetadata(
    MDNode const* MD,
    ValueToValueMapTy& VM,
    RemapFlags Flags = RF_None,
    ValueMapTypeRemapper* TypeMapper = nullptr,
    ValueMaterializer* Materializer = nullptr,
    MetadataPredicate const* IdentityMD = nullptr);

Return Value

The mapped metadata node.

Parameters

NameDescription
MDMetadata node to look up or map.
VMMapping from original values to remapped values.
FlagsRemapping flags that control mapper behavior.
TypeMapperOptional callback that remaps types while mapping values.
MaterializerOptional callback that materializes unmapped values.
IdentityMDOptional predicate for metadata that maps onto itself.