On Thu, Jun 24, 2021 at 5:31 PM Jason Merrill via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > On 6/24/21 11:13 AM, Jose E. Marchesi wrote: > > > >>>>> This patch introduces a dwarf2int.h header, to be used by code that > >>>>> needs access to the internal DIE structures and their attributes. > >>>> > >>>> Why not put these bits in dwarf2out.h? > >>> We think that it makes sense to have a separated interface file for > >>> the > >>> implementation of DWARF-based debug formats. It is called `internal' > >>> because it provides access to internal data structures as well as the > >>> basic accessor functions to the internals of the DWARF DIEs. > >> > >> Yes, but "internal data structures" also describes most of the current > >> dwarf2out.h. > > > > Yes right, dwarf2out.h contains a mixture of function prototypes and > > several data structures, many of them "internal". > > > >> I'm not opposed to refactoring the header, but splitting > >> off a dwarf2cfi.h (for print-rtl.c and final.c) seems like a better > >> dividing line. > > > > Ok, so what about this: at this point we remove dwarf2int.h from our > > patch, put the definitions in dwarf2out.h instead, and then once the > > stuff is upstream we can discuss on how better refactor the dwarf2out* > > stuff. > > > > Is that ok? > > Sounds good.
Fine with me as well. Richard. > Jason >