vec.c (vec_prefix::calculate_allocation): Move as inline variant to vec.h.
commit3a938d756bad13643f32468815db337d3e5c1821
authorRichard Biener <rguenther@suse.de>
Wed, 12 Feb 2014 16:01:03 +0000 (12 16:01 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 12 Feb 2014 16:01:03 +0000 (12 16:01 +0000)
tree4573e5bb36217b90a92b4e79ed9e8f3631260871
parentad0188be2152e741de7aa4b839a3e8b72b930dfa
vec.c (vec_prefix::calculate_allocation): Move as inline variant to vec.h.

2014-02-12  Richard Biener  <rguenther@suse.de>

* vec.c (vec_prefix::calculate_allocation): Move as
inline variant to vec.h.
(vec_prefix::calculate_allocation_1): New out-of-line version.
* vec.h (vec_prefix::calculate_allocation_1): Declare.
(vec_prefix::m_has_auto_buf): Rename to ...
(vec_prefix::m_using_auto_storage): ... this.
(vec_prefix::calculate_allocation): Inline the easy cases
and dispatch to calculate_allocation_1 which doesn't need the
prefix address.
(va_heap::reserve): Use gcc_checking_assert.
(vec<T, A, vl_embed>::embedded_init): Add argument to initialize
m_using_auto_storage.
(auto_vec): Change m_vecpfx member to a vec<T, va_heap, vl_embed>
member and adjust.
(vec<T, va_heap, vl_ptr>::reserve): Remove redundant check.
(vec<T, va_heap, vl_ptr>::release): Avoid casting.
(vec<T, va_heap, vl_ptr>::using_auto_storage): Simplify.

From-SVN: r207729
gcc/ChangeLog
gcc/vec.c
gcc/vec.h