diff options
author | dehao <dehao@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-09-25 13:19:33 +0000 |
---|---|---|
committer | dehao <dehao@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-09-25 13:19:33 +0000 |
commit | 5c1946c8ac9700d95b38682755166416033f3cb2 (patch) | |
tree | 15300d39cad0dd42a53b5a881a84a683ae95f406 /libcpp/include | |
parent | 9b69a8dd0f6951dddb8c2764d5fc28c8b4ac3324 (diff) | |
download | gcc-5c1946c8ac9700d95b38682755166416033f3cb2.tar.gz |
gcc:
2012-09-25 Dehao Chen <dehao@google.com>
PR middle-end/54645
* c-family/c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
map when read in the pch.
libcpp:
2012-09-25 Dehao Chen <dehao@google.com>
PR middle-end/54645
* include/line-map.h (location_adhoc_data): Move location_adhoc_data
into GC.
(location_adhoc_data_map): Likewise.
(line_maps): Likewise.
(rebuild_location_adhoc_htab): New Function.
* line-map.c (+rebuild_location_adhoc_htab): new Funcion.
(get_combined_adhoc_loc): Move location_adhoc_data into GC.
(location_adhoc_data_fini): Likewise.
(linemap_init): Likewise.
(location_adhoc_data_init): Remove Function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191706 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/include')
-rw-r--r-- | libcpp/include/line-map.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h index 86f8383dcd8..5f4bcd780fa 100644 --- a/libcpp/include/line-map.h +++ b/libcpp/include/line-map.h @@ -260,9 +260,9 @@ struct GTY(()) maps_info { }; /* Data structure to associate an arbitrary data to a source location. */ -struct location_adhoc_data { +struct GTY(()) location_adhoc_data { source_location locus; - void *data; + void * GTY((skip)) data; }; struct htab; @@ -277,11 +277,11 @@ struct htab; bits of the integer is used to index the location_adhoc_data array, in which the locus and associated data is stored. */ -struct location_adhoc_data_map { - struct htab *htab; +struct GTY(()) location_adhoc_data_map { + struct htab * GTY((skip)) htab; source_location curr_loc; - struct location_adhoc_data *data; unsigned int allocated; + struct location_adhoc_data GTY((length ("%h.allocated"))) *data; }; /* A set of chronological line_map structures. */ @@ -315,7 +315,7 @@ struct GTY(()) line_maps { allocated, for a certain allocation size requested. */ line_map_round_alloc_size_func round_alloc_size; - struct location_adhoc_data_map GTY((skip)) location_adhoc_data_map; + struct location_adhoc_data_map location_adhoc_data_map; }; /* Returns the pointer to the memory region where information about @@ -446,6 +446,8 @@ extern source_location get_location_from_adhoc_loc (struct line_maps *, #define COMBINE_LOCATION_DATA(SET, LOC, BLOCK) \ get_combined_adhoc_loc ((SET), (LOC), (BLOCK)) +extern void rebuild_location_adhoc_htab (struct line_maps *); + /* Initialize a line map set. */ extern void linemap_init (struct line_maps *); |