[llvm] [IR] Use alloc markers for operator delete variants (PR #138261)

Daniel Paoliello via llvm-commits llvm-commits at lists.llvm.org
Mon May 5 10:36:54 PDT 2025


================
@@ -54,21 +54,24 @@ class User : public Value {
   void *operator new(size_t Size) = delete;
 
   /// Indicates this User has operands "hung off" in another allocation.
-  struct HungOffOperandsAllocMarker {};
+  struct HungOffOperandsAllocMarker {
+    /// The number of operands for this User.
+    unsigned NumOps;
+  };
 
   /// Indicates this User has operands co-allocated.
   struct IntrusiveOperandsAllocMarker {
     /// The number of operands for this User.
-    const unsigned NumOps;
----------------
dpaoliello wrote:

Why un-const these?

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


More information about the llvm-commits mailing list