aboutsummaryrefslogtreecommitdiff
path: root/libcpp/include/line-map.h
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 /libcpp/include/line-map.h
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 'libcpp/include/line-map.h')
-rw-r--r--libcpp/include/line-map.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h
index 86a33f1..27aa094 100644
--- a/libcpp/include/line-map.h
+++ b/libcpp/include/line-map.h
@@ -113,7 +113,9 @@ typedef unsigned int linenum_type;
... | |
0xffffffff | UINT_MAX |
-----------+-------------------------------+-------------------------------
- . */
+
+ To see how this works in practice, see the worked example in
+ libcpp/location-example.txt. */
typedef unsigned int source_location;
/* Memory allocation function typedef. Works like xrealloc. */