This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 03/35] Change use to type-based pool allocator in lra-lives.c.


On Wed, May 27, 2015 at 03:56:44PM +0200, mliska wrote:
>  copy_live_range (lra_live_range_t r)
>  {
> -  lra_live_range_t p;
> -
> -  p = (lra_live_range_t) pool_alloc (live_range_pool);
> +  lra_live_range_t p = new lra_live_range;
>    *p = *r;

I think the default copy ctor should be fine so you could just do
new lra_live_range (*r);

Trev


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]