[llvm] [Utils] Extract CollectDebugInfoForCloning from CloneFunctionInto (PR #114537)

Felipe de Azevedo Piovezan via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 20 08:19:26 PST 2024


================
@@ -207,6 +207,20 @@ void CloneAndPruneFunctionInto(Function *NewFunc, const Function *OldFunc,
                                const char *NameSuffix = "",
                                ClonedCodeInfo *CodeInfo = nullptr);
 
+/// Collect debug information such as types, compile units, and other
+/// subprograms that are reachable from \p F and can be considered global for
+/// the purposes of cloning (and hence not needing to be cloned).
+///
+/// The latter depends on \p Changes: when cloning into the same module we
----------------
felipepiovezan wrote:

Nit: it's unusual to use "the latter" after switching paragraphs. I'm assuming you are referring to "subprograms" here (note how far it is in the text), in which case we should replace "the latter" with "cloning subprograms"

https://github.com/llvm/llvm-project/pull/114537


More information about the llvm-commits mailing list