This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [4.5] [RFC] Move line-map.* to its own library (libloc)
- From: Tom Tromey <tromey at redhat dot com>
- To: Manuel LÃpez-IbÃÃez <lopezibanez at gmail dot com>
- Cc: "Gcc Patch List" <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 15 Nov 2008 09:48:25 -0700
- Subject: Re: [4.5] [RFC] Move line-map.* to its own library (libloc)
- References: <6c33472e0811141202n1619d35n6d7929768e3e36bf@mail.gmail.com>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Manuel" == Manuel LÃpez-IbÃÃez <lopezibanez@gmail.com> writes:
Manuel> The following patch moves line-map.* and other stuff related to
Manuel> locations to a library called libloc. Anything that only needs
Manuel> location info does not need to link against libcpp or include libcpp.h
Manuel> anymore.
Is the rationale for this just to avoid pulling in the rest of libcpp?
That doesn't seem like a big enough benefit to justify making a new
library.
I can't approve or reject this part, though. Some global reviewer
would have to.
Manuel> * tree.c (expand_location): Move to line-map.c.
Manuel> * input.h (UNKNOWN_LOCATION): Move to line-map.h.
Manuel> (BUILTINS_LOCATION): Likewise.
I like most of these changes.
One oddity here is that BUILTINS_LOCATION is not actually enforced, or
even known about, by line-map. It is only "correct" because gcc is
careful to arrange things that way. So, it isn't clear that moving
this to line-map is enough -- in the sense that, there is still an
un-obvious dependency between how gcc is coded and what the #define
claims. So, I don't think moving this makes sense unless it is
accompanied by some other changes to line-map -- BUILTINS_LOCATION is
really an implementation detail of gcc, not part of the interface.
Why is expand_location a #define now?
Tom