[llvm] [Utils] Identity map module-level debug info on first use in CloneFunction* (PR #118627)
Felipe de Azevedo Piovezan via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 17 09:52:13 PST 2024
================
@@ -152,61 +152,54 @@ DISubprogram *llvm::CollectDebugInfoForCloning(const Function &F,
return SPClonedWithinModule;
}
-bool llvm::BuildDebugInfoMDMap(DenseMap<const Metadata *, TrackingMDRef> &MD,
- CloneFunctionChangeType Changes,
- DebugInfoFinder &DIFinder,
- DISubprogram *SPClonedWithinModule) {
- bool ModuleLevelChanges = Changes > CloneFunctionChangeType::LocalChangesOnly;
+void llvm::FindDebugInfoToIdentityMap(MetadataSetTy &MD,
+ CloneFunctionChangeType Changes,
+ DebugInfoFinder &DIFinder,
+ DISubprogram *SPClonedWithinModule) {
if (Changes < CloneFunctionChangeType::DifferentModule &&
DIFinder.subprogram_count() > 0) {
- // Turn on module-level changes, since we need to clone (some of) the
- // debug info metadata.
+ // Even if Changes are local only, we turn on module-level changes, since we
+ // need to clone (some of) the debug info metadata.
----------------
felipepiovezan wrote:
Similar to my other comment, is this comment needed? It is referring to code that used to exist, not to the code as it exists now
https://github.com/llvm/llvm-project/pull/118627
More information about the llvm-commits
mailing list