[llvm] [DebugInfo][RemoveDIs] Add local-utility plumbing for DPValues (PR #72276)
Orlando Cazalet-Hyams via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 16 05:38:13 PST 2023
================
@@ -3121,9 +3420,24 @@ void llvm::copyRangeMetadata(const DataLayout &DL, const LoadInst &OldLI,
void llvm::dropDebugUsers(Instruction &I) {
SmallVector<DbgVariableIntrinsic *, 1> DbgUsers;
- findDbgUsers(DbgUsers, &I);
- for (auto *DII : DbgUsers)
- DII->eraseFromParent();
+ SmallVector<DPValue *, 1> DPUsers;
+ findDbgUsers(DbgUsers, &I, &DPUsers);
+ for (auto *DII : DbgUsers) {
+ if (auto *DbgValue = dyn_cast<DbgValueInst>(DII)) {
+ // Don't delete dbg.values, that's bad.
----------------
OCHyams wrote:
My apologies
https://github.com/llvm/llvm-project/pull/72276
More information about the llvm-commits
mailing list