diff options
author | Lewis Hyatt <lhyatt@gmail.com> | 2024-10-25 10:18:12 -0400 |
---|---|---|
committer | Lewis Hyatt <lhyatt@gcc.gnu.org> | 2024-11-23 13:44:38 -0500 |
commit | c488e23f66388a684f4a7e7e38f97d3358225488 (patch) | |
tree | 187d8365307d3ba1559751e4f5c59d323335d15f /gcc/function.cc | |
parent | cd86dd5f43f7b9ea688a404840ef9d5e0f5e4cf0 (diff) | |
download | gcc-c488e23f66388a684f4a7e7e38f97d3358225488.zip gcc-c488e23f66388a684f4a7e7e38f97d3358225488.tar.gz gcc-c488e23f66388a684f4a7e7e38f97d3358225488.tar.bz2 |
Support for 64-bit location_t: C++ modules parts
The modules implementation is necessarily sensitive to the internal workings
of class line_map, and so it needed changes in order to handle a 64-bit
location_t. The changes mostly boil down to supporting that in the debug
dumping routines (which is accomplished by using a new custom code %K for
that purpose), and supporting that when streaming in and out from the
module (which is accomplished by using a new loc() function to go along with
existing abstractions like u() or z() for streaming in and out different
data types).
gcc/cp/ChangeLog:
* module.cc (bytes_out::loc): New function.
(bytes_in::loc): New function.
(struct span): Change int fields to location_diff_t.
(range_t): Change from "unsigned int" to "line_map_uint_t".
(struct ord_loc_info): Likewise.
(struct macro_loc_info): Likewise.
(class module_state): Likewise.
(dumper::operator()): Add new code 'K' for dumping a location_t.
(loc_spans::init): Use %K instead of %u for location_t dumps.
(loc_spans::open): Likewise.
(loc_spans::close): Likewise. Adjust bitwise expressions to support
64-bit location_t as well.
(struct module_state_config): Change ordinary_locs and macro_locs
from "unsigned int" to "line_map_uint_t". Reorder fields to improve
packing. Rather than changing the constructor initializer list to
match the new order, switch to NSDMI instead.
(module_state::note_location): Adjust to support 64-bit location_t.
(module_state::write_location): Use %K instead of %u for location_t
dumps. Use loc() instead of u() for streaming location_t.
(module_state::read_location): Likewise.
(module_state::write_ordinary_maps): Likewise.
(module_state::write_macro_maps): Likewise.
(module_state::write_config): Likewise.
(module_state::read_config): Likewise.
(module_state::write_prepare_maps): Use %K instead of %u for
location_t dumps. Adjust variable types and bitwise expressions to
support 64-bit location_t.
(module_state::read_ordinary_maps): Likewise.
(module_state::read_macro_maps): Likewise.
(preprocess_module): Adjust data types to support 64-bit number of
line maps.
Diffstat (limited to 'gcc/function.cc')
0 files changed, 0 insertions, 0 deletions