]> git.ipfire.org Git - thirdparty/gcc.git/commit
Store include-from as a location, not line-map index.
authorNathan Sidwell <nathan@acm.org>
Wed, 11 Jul 2018 13:35:57 +0000 (13:35 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Wed, 11 Jul 2018 13:35:57 +0000 (13:35 +0000)
commit87bda85c6711f372a12a1152d41e2f7ef9b2050b
tree168e2e7ded179a560142894831f7140e8f3d2131
parentcd1941d12291983943ea7e4c8de7de11c4f434eb
Store include-from as a location, not line-map index.

libcpp/
* include/line-map.h (line_map_ordinary): Replace included_from
index with included_at source_location.
(ORDINARY_MAP_INCLUDER_FILE_INDEX, LAST_SOURCE_LINE_LOCATION)
(LAST_SOURCE_LINE, LAST_SOURCE_COLUMN): Delete.
(INCUDED_FROM): Delete.
(INCLUDED_AT, linemap_included_at): New.
(MAIN_FILE_P): Adjust.
* directives.c (do_linemarker): Use linemap_included_at.
* line-map.c (include_at_map): New.
(line_check_files_exited): Use it.
(LAST_SOURCE_LINE_LOCATION): New (moved from header).
(linemap_add, linemap_dump, linemap_dump_location): Adjust.
gcc/
* diagnostic.c (diagnostic_report_current_module): Use
linemap_included_at.  Adjust line & col discovery.
gcc/c-family/
* c-common.c (try_to_locate_new_include_insertion_point): Use
linemap_included_at.
* c-lex.c (fe_file_change): Use INCLUDED_AT.
* c-ppoutput.c (pp_file_change): Likewise.
gcc/fortran/
* cpp.c (cb_file_change): Adjust for line map inclusion changes.

From-SVN: r262553
ChangeLog.name-lookup
gcc/c-family/c-common.c
gcc/c-family/c-lex.c
gcc/c-family/c-ppoutput.c
gcc/diagnostic.c
gcc/fortran/cpp.c
libcpp/directives.c
libcpp/include/line-map.h
libcpp/line-map.c