[llvm] Handle #dbg_values in SROA. (PR #94070)
Adrian Prantl via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 6 08:51:50 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:
(maybe we could handle it with DW_OP_implicit_pointer, but let's not overcomplicate things now)
https://github.com/llvm/llvm-project/pull/94070
More information about the llvm-commits
mailing list