Re: [PATCH 1/3] Refactor copying decl section names

2020-11-11 Thread Jeff Law via Gcc-patches
On 11/10/20 10:11 PM, Alan Modra wrote: > On Tue, Nov 10, 2020 at 09:19:37PM -0700, Jeff Law wrote: >> I think the const char * is fine. That should force resolution to the >> same routine we were using earlier. Do you want to commit that fix or >> shall I? > Commited 693a79a355e1. THanks.  I

Re: [PATCH 1/3] Refactor copying decl section names

2020-11-10 Thread Alan Modra via Gcc-patches
On Tue, Nov 10, 2020 at 09:19:37PM -0700, Jeff Law wrote: > I think the const char * is fine. That should force resolution to the > same routine we were using earlier. Do you want to commit that fix or > shall I? Commited 693a79a355e1. -- Alan Modra Australia Development Lab, IBM

Re: [PATCH 1/3] Refactor copying decl section names

2020-11-10 Thread Jeff Law via Gcc-patches
On 11/10/20 8:57 PM, Alan Modra wrote: > On Tue, Nov 10, 2020 at 11:45:37AM -0700, Jeff Law wrote: >> On 11/12/19 11:28 PM, Strager Neds wrote: >>> * gcc/cgraph.h (symtab_node::get_section): Constify. >>> (symtab_node::set_section): Declare new overload. >>> * gcc/symtab.c (symtab_node::set_secti

Re: [PATCH 1/3] Refactor copying decl section names

2020-11-10 Thread Alan Modra via Gcc-patches
On Tue, Nov 10, 2020 at 11:45:37AM -0700, Jeff Law wrote: > > On 11/12/19 11:28 PM, Strager Neds wrote: > > * gcc/cgraph.h (symtab_node::get_section): Constify. > > (symtab_node::set_section): Declare new overload. > > * gcc/symtab.c (symtab_node::set_section): Define new overload. > > (symtab_nod

Re: [PATCH 1/3] Refactor copying decl section names

2020-11-10 Thread Jeff Law via Gcc-patches
On 11/12/19 11:28 PM, Strager Neds wrote: > * gcc/cgraph.h (symtab_node::get_section): Constify. > (symtab_node::set_section): Declare new overload. > * gcc/symtab.c (symtab_node::set_section): Define new overload. > (symtab_node::copy_visibility_from): Use new overload of > symtab_node::set_sect

Re: [PATCH 1/3] Refactor copying decl section names

2020-11-10 Thread Jeff Law via Gcc-patches
On 11/12/19 11:28 PM, Strager Neds wrote: > Sometimes, we need to copy a section name from one decl or symtab node > to another. Currently, this is done by getting the source's section > name and setting the destination's section name. For example: > > set_decl_section_name (dest, DECL_SECTIO

Re: [PATCH 1/3] Refactor copying decl section names

2020-01-14 Thread Jeff Law
On Tue, 2019-11-12 at 22:28 -0800, Strager Neds wrote: > Sometimes, we need to copy a section name from one decl or symtab node > to another. Currently, this is done by getting the source's section > name and setting the destination's section name. For example: > > set_decl_section_name (dest,

[PATCH 1/3] Refactor copying decl section names

2019-11-12 Thread Strager Neds
Sometimes, we need to copy a section name from one decl or symtab node to another. Currently, this is done by getting the source's section name and setting the destination's section name. For example: set_decl_section_name (dest, DECL_SECTION_NAME (source)); dest->set_section (source->get_