libcpp/input.c: Add a way to visualize the linemaps (-fdump-internal-locations)
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 13 May 2015 13:58:18 +0000 (13:58 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Wed, 13 May 2015 13:58:18 +0000 (13:58 +0000)
commitba4ad400f1e4f726adb431aedea3c0ddf1e3315a
tree263b351fcddaa726d296fc21e6f1f001c2221d5e
parent49d50b6b8f727b681410a1865aadd915a14df2a5
libcpp/input.c: Add a way to visualize the linemaps (-fdump-internal-locations)

gcc/ChangeLog:
* common.opt (fdump-internal-locations): New option.
* input.c: Include diagnostic-core.h.
(get_end_location): New function.
(write_digit): New function.
(write_digit_row): New function.
(dump_location_range): New function.
(dump_labelled_location_range): New function.
(dump_location_info): New function.
* input.h (dump_location_info): New prototype.
* toplev.c (compile_file): Handle flag_dump_locations.

libcpp/ChangeLog:
* include/line-map.h (source_location): Add a reference to
location-example.txt to the descriptive comment.
* location-example.txt: New file.

From-SVN: r223163
gcc/ChangeLog
gcc/common.opt
gcc/input.c
gcc/input.h
gcc/toplev.c
libcpp/ChangeLog
libcpp/include/line-map.h
libcpp/location-example.txt [new file with mode: 0644]