[llvm] [NFC][Utils] Extract CloneFunctionMetadataInto from CloneFunctionInto (PR #118623)
Artem Pianykh via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 10 23:49:57 PST 2024
================
@@ -182,6 +182,18 @@ void CloneFunctionAttributesInto(Function *NewFunc, const Function *OldFunc,
ValueMapTypeRemapper *TypeMapper = nullptr,
ValueMaterializer *Materializer = nullptr);
+/// Clone OldFunc's metadata into NewFunc.
+///
+/// The caller is expected to populate \p VMap beforehand and set an appropriate
+/// \p RemapFlag.
+///
+/// NOTE: This function doesn't clone !llvm.dbg.cu when cloning into a different
+/// module. Use CloneFunctionInto for that behavior.
+void CloneFunctionMetadataInto(Function *NewFunc, const Function *OldFunc,
----------------
artempyanykh wrote:
Both can't be null. Made them references.
https://github.com/llvm/llvm-project/pull/118623
More information about the llvm-commits
mailing list