[llvm] [Utils] Extract CollectDebugInfoForCloning from CloneFunctionInto (PR #114537)
Artem Pianykh via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 12 03:03:17 PST 2024
================
@@ -207,6 +207,15 @@ void CloneAndPruneFunctionInto(Function *NewFunc, const Function *OldFunc,
const char *NameSuffix = "",
ClonedCodeInfo *CodeInfo = nullptr);
+/// Process function's subprogram attachment to collect relevant debug
+/// information in DIFinder.
----------------
artempyanykh wrote:
@felipepiovezan I took another stab. Let me know if it's a bit clearer now. I agree that the semantics of this function is not straightforward, but I didn't want to deviate too much from the original code (iow. I tried to make this refactor as close to a mechanical transformation as possible and keep the existing behavior). We can make it crisper but it'll require a longer refactoring tangent. (Alternatively, refactoring this further on top of changes in #109032 will be easier).
LMK if this tradeoff makes sense.
https://github.com/llvm/llvm-project/pull/114537
More information about the llvm-commits
mailing list