[llvm] [Utils] Identity map module-level debug info on first use in CloneFunction* (PR #118627)
Artem Pianykh via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 9 12:51:03 PST 2025
================
@@ -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.
----------------
artempyanykh wrote:
Good call! Agree this whole comment block doesn't add clarity. Removed it.
https://github.com/llvm/llvm-project/pull/118627
More information about the llvm-commits
mailing list