[llvm-branch-commits] [llvm] [NFC][Utils] Extract CloneFunctionMetadataInto from CloneFunctionInto (PR #118623)
Felipe de Azevedo Piovezan via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Dec 9 09:44:21 PST 2024
================
@@ -200,6 +200,22 @@ bool llvm::BuildDebugInfoMDMap(DenseMap<const Metadata *, TrackingMDRef> &MD,
return ModuleLevelChanges;
}
+void llvm::CloneFunctionMetadataInto(Function *NewFunc, const Function *OldFunc,
+ ValueToValueMapTy &VMap,
+ RemapFlags RemapFlag,
+ ValueMapTypeRemapper *TypeMapper,
+ ValueMaterializer *Materializer) {
+ // Duplicate the metadata that is attached to the cloned function.
----------------
felipepiovezan wrote:
Note that, in the context of this function, there is no "cloned function", it's either `NewFunc` or `OldFunc`.
That said, I this comment fits better in the documentation of the header, as there is important information here that callers should be aware
https://github.com/llvm/llvm-project/pull/118623
More information about the llvm-branch-commits
mailing list