aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2015-05-13 13:58:18 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2015-05-13 13:58:18 +0000
commitba4ad400f1e4f726adb431aedea3c0ddf1e3315a (patch)
tree263b351fcddaa726d296fc21e6f1f001c2221d5e /gcc/toplev.c
parent49d50b6b8f727b681410a1865aadd915a14df2a5 (diff)
downloadgcc-ba4ad400f1e4f726adb431aedea3c0ddf1e3315a.zip
gcc-ba4ad400f1e4f726adb431aedea3c0ddf1e3315a.tar.gz
gcc-ba4ad400f1e4f726adb431aedea3c0ddf1e3315a.tar.bz2
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
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 9b1151b..3c1ba38 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. */