diff mbox series

[03/41] sbitmap.h: add operator const_sbitmap to auto_sbitmap

Message ID 20200108090302.2425-4-dmalcolm@redhat.com
State New
Headers show
Series v5 of analyzer patch kit | expand

Commit Message

David Malcolm Jan. 8, 2020, 9:02 a.m. UTC
Needs review.  (Used in one place by region-model.cc)

Changed in v5:
- follow msebor's suggestion of using operator const_sbitmap
rather than operator const sbitmap&, as per:
https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00224.html

gcc/ChangeLog:
	* sbitmap.h (auto_sbitmap): Add operator const_sbitmap.
---
 gcc/sbitmap.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Jeff Law Jan. 8, 2020, 9:57 p.m. UTC | #1
On Wed, 2020-01-08 at 04:02 -0500, David Malcolm wrote:
> Needs review.  (Used in one place by region-model.cc)
> 
> Changed in v5:
> - follow msebor's suggestion of using operator const_sbitmap
> rather than operator const sbitmap&, as per:
> https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00224.html
> 
> gcc/ChangeLog:
> 	* sbitmap.h (auto_sbitmap): Add operator const_sbitmap.
OK.
jeff
>
diff mbox series

Patch

diff --git a/gcc/sbitmap.h b/gcc/sbitmap.h
index e3f514f0ebf1..9c4215db29b0 100644
--- a/gcc/sbitmap.h
+++ b/gcc/sbitmap.h
@@ -295,6 +295,7 @@  public:
 
   /* Allow calling sbitmap functions on our bitmap.  */
   operator sbitmap () { return m_bitmap; }
+  operator const_sbitmap () const { return m_bitmap; }
 
 private:
   /* Prevent making a copy that refers to our sbitmap.  */