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

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri May 2 05:41:26 PDT 2025


================
@@ -54,7 +54,10 @@ 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.
+    const unsigned NumOps;
----------------
nikic wrote:

```suggestion
    unsigned NumOps;
```
Avoid (non-static) const members.

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


More information about the llvm-commits mailing list