Clone OldFunc's attributes into NewFunc, transforming values based on the mappings in VMap.

Synopsis

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

void
CloneFunctionAttributesInto(
    Function* NewFunc,
    Function const* OldFunc,
    ValueToValueMapTy& VMap,
    bool ModuleLevelChanges,
    ValueMapTypeRemapper* TypeMapper = nullptr,
    ValueMaterializer* Materializer = nullptr);

Parameters

Name

Description

NewFunc

Destination function that receives the cloned attributes.

OldFunc

Source function whose attributes are copied.

VMap

Mapping used to remap attribute values.

ModuleLevelChanges

Whether module‐level value remapping is allowed.

TypeMapper

Optional remapper for types encountered while cloning.

Materializer

Optional materializer for values missing from VMap.

Created with MrDocs