[llvm] Handle #dbg_values in SROA. (PR #94070)

Stephen Tozer via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 9 02:53:15 PDT 2024


================
@@ -4977,8 +4977,6 @@ const Value *getAddress(const DbgVariableIntrinsic *DVI) {
 }
 
 const Value *getAddress(const DbgVariableRecord *DVR) {
-  assert(DVR->getType() == DbgVariableRecord::LocationType::Declare ||
-         DVR->getType() == DbgVariableRecord::LocationType::Assign);
----------------
SLTozer wrote:

Removing this assert is questionable imo - although `getAddress()` on a dbg_value will currently give you the location operand, it's not guaranteed to work and will likely be broken by future API changes.

https://github.com/llvm/llvm-project/pull/94070


More information about the llvm-commits mailing list