]> git.ipfire.org Git - thirdparty/gcc.git/commit
Constify invariant fields of vrange and irange.
authorAldy Hernandez <aldyh@redhat.com>
Thu, 2 Mar 2023 12:12:45 +0000 (13:12 +0100)
committerAldy Hernandez <aldyh@redhat.com>
Tue, 18 Apr 2023 05:32:07 +0000 (07:32 +0200)
commit027a94b00759ad19a9b8b99b36819b6f60d5560e
tree6683763996250c9e138e5d08122ae6afe831e28a
parentd2ee685f6fa922e97908ed998d14def9e01e1e4e
Constify invariant fields of vrange and irange.

The discriminator in vrange cannot change after construction,
similarly the number of allocated ranges in an irange.  It's best to
make them constant to avoid invalid changes.

gcc/ChangeLog:

* value-range.h (class vrange): Make m_discriminator const.
(class irange): Make m_max_ranges const.  Adjust constructors
accordingly.
(class unsupported_range): Construct vrange appropriately.
(class frange): Same.
gcc/value-range.h