diff --git a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp --- a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp @@ -1378,19 +1378,8 @@ II->eraseFromParent(); } } - if (memtag::alignAndPadAlloca(Info, Align(Mapping.getObjectAlignment()))) { - for (auto DVI : Info.DbgVariableIntrinsics) { - SmallDenseSet LocationOps(DVI->location_ops().begin(), - DVI->location_ops().end()); - for (Value *V : LocationOps) { - if (auto *AI = dyn_cast_or_null(V)) { - if (V == AI) - DVI->replaceVariableLocationOp(V, Info.AI); - } - } - } + if (memtag::alignAndPadAlloca(Info, Align(Mapping.getObjectAlignment()))) AI->eraseFromParent(); - } } for (auto &I : SInfo.UnrecognizedLifetimes) I->eraseFromParent();