From: Richard Sandiford Date: Mon, 27 Apr 2015 09:55:21 +0000 (+0000) Subject: vec.h (vec): Make splice arguments const. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9e3a513193028ba501867dd4a6090ae904eb1abc;p=gcc.git vec.h (vec): Make splice arguments const. gcc/ * vec.h (vec): Make splice arguments const. Update definitions accordingly. From-SVN: r222454 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3ec5aa74ab5..f9eba482611 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-04-27 Richard Sandiford + + * vec.h (vec): Make splice arguments const. Update definitions + accordingly. + 2015-04-27 Yvan Roux * config/arm/arm.md (*arm_subsi3_insn): Fixed redundant diff --git a/gcc/vec.h b/gcc/vec.h index 7d1bdafd92e..aa9a255bf97 100644 --- a/gcc/vec.h +++ b/gcc/vec.h @@ -483,8 +483,8 @@ public: bool iterate (unsigned, T *) const; bool iterate (unsigned, T **) const; vec *copy (ALONE_CXX_MEM_STAT_INFO) const; - void splice (vec &); - void splice (vec *src); + void splice (const vec &); + void splice (const vec *src); T *quick_push (const T &); T &pop (void); void truncate (unsigned); @@ -705,7 +705,7 @@ vec_safe_copy (vec *src CXX_MEM_STAT_INFO) Reallocate DST, if necessary. */ template inline void -vec_safe_splice (vec *&dst, vec *src +vec_safe_splice (vec *&dst, const vec *src CXX_MEM_STAT_INFO) { unsigned src_len = vec_safe_length (src); @@ -836,7 +836,7 @@ vec::copy (ALONE_MEM_STAT_DECL) const template inline void -vec::splice (vec &src) +vec::splice (const vec &src) { unsigned len = src.length (); if (len) @@ -849,7 +849,7 @@ vec::splice (vec &src) template inline void -vec::splice (vec *src) +vec::splice (const vec *src) { if (src) splice (*src); @@ -1212,8 +1212,8 @@ public: vec copy (ALONE_CXX_MEM_STAT_INFO) const; bool reserve (unsigned, bool = false CXX_MEM_STAT_INFO); bool reserve_exact (unsigned CXX_MEM_STAT_INFO); - void splice (vec &); - void safe_splice (vec & CXX_MEM_STAT_INFO); + void splice (const vec &); + void safe_splice (const vec & CXX_MEM_STAT_INFO); T *quick_push (const T &); T *safe_push (const T &CXX_MEM_STAT_INFO); T &pop (void); @@ -1489,7 +1489,7 @@ vec::release (void) template inline void -vec::splice (vec &src) +vec::splice (const vec &src) { if (src.m_vec) m_vec->splice (*(src.m_vec)); @@ -1503,7 +1503,7 @@ vec::splice (vec &src) template inline void -vec::safe_splice (vec &src +vec::safe_splice (const vec &src MEM_STAT_DECL) { if (src.length ())