[llvm] [IR] Use alloc markers for operator delete variants (PR #138261)
Marc Auberer via llvm-commits
llvm-commits at lists.llvm.org
Mon May 5 13:13:02 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;
----------------
marcauberer wrote:
This is for consistency, because in `HungOffOperandsAllocMarker` the members are also non-const.
https://github.com/llvm/llvm-project/pull/138261
More information about the llvm-commits
mailing list