[llvm] Globalopt pass produces invalid debug info (PR #100654)
Stephen Tozer via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 29 02:40:36 PDT 2024
================
@@ -1338,6 +1338,7 @@ deleteIfDead(GlobalValue &GV,
if (DeleteFnCallback)
DeleteFnCallback(*F);
}
+ ReplaceableMetadataImpl::SalvageDebugInfo(GV);
----------------
SLTozer wrote:
Is this line necessary? I believe `GV.removeDeadConstantUsers();` should already call this if `GV` is dead, as part of `constantIsDead(..., /*RemoveDeadUsers=*/true)`.
https://github.com/llvm/llvm-project/pull/100654
More information about the llvm-commits
mailing list