From 28f17529c8d4673d26b8e1c9e0dd87a64a4f0240 Mon Sep 17 00:00:00 2001 From: dmalcolm Date: Wed, 13 May 2015 13:58:18 +0000 Subject: 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223163 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/toplev.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/toplev.c') diff --git a/gcc/toplev.c b/gcc/toplev.c index 9b1151b0186..3c1ba38d9c2 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -593,6 +593,9 @@ compile_file (void) timevar_pop (TV_PARSE_GLOBAL); timevar_stop (TV_PHASE_PARSING); + if (flag_dump_locations) + dump_location_info (stderr); + /* Compilation is now finished except for writing what's left of the symbol table output. */ -- cgit v1.2.1