Convert vec<> into a POD.
commit38f2ca3298e1f8b85b29c67ba8a5667fe257464b
authorDiego Novillo <dnovillo@google.com>
Tue, 20 Nov 2012 16:26:09 +0000 (20 11:26 -0500)
committerDiego Novillo <dnovillo@gcc.gnu.org>
Tue, 20 Nov 2012 16:26:09 +0000 (20 11:26 -0500)
treec6eacf875d89904de020dba161a8e1c743b4f46f
parent4a397c3e09d7909f4585b864da9660544d8349f3
Convert vec<> into a POD.

This fixes PR 55398 by making vec<> a true POD.  I thought we could get
away with having private fields, but we can't.  We fail to pass vec<>
instances through varargs.

The patch makes every field public and mangles the field names in the
hope that no future patch will try to make use of them directly.  It's
horrible, but I could not think of anything better.

Tested with clang++ as the host compiler.

2012-11-20  Diego Novillo  <dnovillo@google.com>

    PR middle-end/55398
    * vec.h (class vec_prefix): Make every field public.
    Rename field alloc_ to alloc_PRIVATE_.
    Rename field num_ to num_PRIVATE_.
    Update all users.
    (class vec<T, A, vl_embed>): Make every field public.
    Rename field pfx_ to pfx_PRIVATE_.
    Rename field data_ to data_PRIVATE_.
    Update all users.
    (class vec<T, A, vl_ptr>): Make every field public.
    Rename field vec_ to vec_PRIVATE_.
    Update all users.

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