2008/8/25 Paolo Bonzini <[EMAIL PROTECTED]>: > >>> Even if you do not use line-map.o, the middle-end does, so you still >>> have the duplication. >> >> Right, this is the only part that is indeed shared and for which Ada requires >> libcpp. > > There are exactly 6 uses of linemap functions in libcpp. They could be > replaced with a handful of function pointers, moving line-map.c to gcc.
You have to count all uses of: SOURCE_LINE, SOURCE_COLUMN, MAIN_FILE_P, LAST_SOURCE_LINE, LAST_SOURCE_LINE_LOCATION, and LINEMAP_POSITION_FOR_COLUMN which are all macros. Also, line-map functions seem to be in the critical path, so the extra dereferencing may be noticeable. > There are 2 more uses in makedepend.c, which could define its own dummy > functions because it does not care about locations at all. Sure about that? line-map.h seems pretty important to handle the include stack. Cheers, Manuel.