rnk added inline comments.
================ Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:3946 + // the address of the variable. + if (VD->isNRVOVariable()) + Expr.push_back(llvm::dwarf::DW_OP_deref); ---------------- akhuang wrote: > rnk wrote: > > I think we should check for `getLangOpts().ElideConstructors` here, and > > check that the debug info is correct (no deref) in that mode. > Makes sense, though now I realized there is also an issue because CGDecl > checks whether `ReturnValuePointer` is valid before changing the debug value, > but CGDebugInfo doesn't check this when adding DW_OP_deref.. so maybe it > makes sense to pass something through to `EmitDeclare`? I guess adding a boolean to EmitDeclareOfAutoVariable would be the way to go, and then to thread that through here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63361/new/ https://reviews.llvm.org/D63361 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits