[llvm] Handle #dbg_values in SROA. (PR #94070)
Adrian Prantl via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 7 16:33:58 PDT 2024
================
@@ -5045,10 +5045,20 @@ static void insertNewDbgInst(DIBuilder &DIB, DbgVariableRecord *Orig,
BeforeInst->getIterator());
return;
}
+
+ if (Orig->isDbgValue()) {
+ DbgVariableRecord *DVR = DbgVariableRecord::createDbgVariableRecord(
+ NewAddr, Orig->getVariable(), NewFragmentExpr, Orig->getDebugLoc());
+ BeforeInst->getParent()->insertDbgRecordBefore(DVR,
+ BeforeInst->getIterator());
----------------
adrian-prantl wrote:
You marked this as resolved, but did you add the check/assert?
https://github.com/llvm/llvm-project/pull/94070
More information about the llvm-commits
mailing list