llvm::MapMetadata

MapMetadata overloads

Synopses

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

Version of MapMetadata with type safety for MDNode.

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

Lookup or compute a mapping for a piece of metadata.

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

Return Value

  • The mapped metadata node.
  • The mapped metadata, or nullptr when mapping fails.

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.