[llvm] Add code to handle #debug_values in SROA. (PR #94068)

Shubham Sandeep Rastogi via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 5 21:54:43 PDT 2024


================
@@ -341,6 +341,13 @@ class DbgVariableIntrinsic : public DbgInfoIntrinsic {
     return getIntrinsicID() == Intrinsic::dbg_declare;
   }
 
+  /// Does this describe the value of a local variable. True for dbg.value,
+  /// but not dbg.declare, which describes its address, or dbg.assign, which
+  /// describes a combination of the variable's value and address.
+  bool isValueOfVariable() const {
+    return getIntrinsicID() == Intrinsic::dbg_value;
----------------
rastogishubham wrote:

@SLTozer is right, maybe I need to word it better

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


More information about the llvm-commits mailing list