This is the mail archive of the
mailing list for the GCC project.
Re: [4.5] [RFC] Move line-map.* to its own library (libloc)
2008/11/17 Tom Tromey <email@example.com>:
> Manuel> expand_location should take an explicit line_table and all calls
> Manuel> should be updated.
> I'm all in favor of this kind of thing. One thing to consider,
> though, is where this extra argument is stored, if not in a global.
> One attraction of line-maps is that it saves space (compared to the
> old, expanded location type); adding a pointer to every location_t
> would negate this advantage.
You don't need a pointer to every location_t. It could be within some
structure that lives during the whole time the line table is needed or
it can still be global. expand_location just takes the extra argument.
In case of libcpp, it is part of cpp_reader, in case of the rest of
GCC it is a global variable.