Convert vec<> into a POD.
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 20 Nov 2012 16:26:09 +0000 (16:26 +0000)
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 20 Nov 2012 16:26:09 +0000 (16:26 +0000)
commitaad734b2602808518afb9ef5ccd7c04029216b5f
treec6eacf875d89904de020dba161a8e1c743b4f46f
parent1f6035a351d456f4f87727b251d179bbfca84fc8
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193667 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/vec.c
gcc/vec.h