diff options
author | Per Bothner <bothner@gcc.gnu.org> | 2003-12-05 12:52:39 -0800 |
---|---|---|
committer | Per Bothner <bothner@gcc.gnu.org> | 2003-12-05 12:52:39 -0800 |
commit | 7d40b45fcb203d60c6d116d814016a0abe814825 (patch) | |
tree | 3e0094e148de1aa5e175fe54517ab279436e1fba | |
parent | 5849d27c78186fafec6b265c67806d643bb67c88 (diff) | |
download | gcc-7d40b45fcb203d60c6d116d814016a0abe814825.zip gcc-7d40b45fcb203d60c6d116d814016a0abe814825.tar.gz gcc-7d40b45fcb203d60c6d116d814016a0abe814825.tar.bz2 |
line-map.h (source_location): New typedef.
* line-map.h (source_location): New typedef.
(fileline): Redefined as source_location.
(struct line_map, linemap_add, linemap_lookup): Replace filefile
by source_location.
* line-map.c (linemap_add, linemap_lookup): Use source_location.
From-SVN: r74344
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/line-map.c | 6 | ||||
-rw-r--r-- | gcc/line-map.h | 14 |
3 files changed, 20 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9d91798..eaaff18 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2003-12-05 Per Bothner <pbothner@apple.com> + + * line-map.h (source_location): New typedef. + (fileline): Redefined as source_location. + (struct line_map, linemap_add, linemap_lookup): Replace filefile + by source_location. + * line-map.c (linemap_add, linemap_lookup): Use source_location. + 2003-12-05 Richard Henderson <rth@redhat.com> * config/alpha/alpha.c (alpha_build_builtin_va_list): Add dummy @@ -96,6 +104,7 @@ PR target/12467 * config/rs6000/altivec.md (altivec_vmsummbm): Fix typo. +>>>>>>> 2.1930 2003-12-04 Stuart Hastings <stuart@apple.com> * rs6000.c (output_call, macho_branch_islands, diff --git a/gcc/line-map.c b/gcc/line-map.c index f04350d7..521c4e5 100644 --- a/gcc/line-map.c +++ b/gcc/line-map.c @@ -1,5 +1,5 @@ /* Map logical line numbers to (source file, line number) pairs. - Copyright (C) 2001 + Copyright (C) 2001, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it @@ -75,7 +75,7 @@ linemap_free (struct line_maps *set) const struct line_map * linemap_add (struct line_maps *set, enum lc_reason reason, - unsigned int sysp, unsigned int from_line, + unsigned int sysp, source_location from_line, const char *to_file, unsigned int to_line) { struct line_map *map; @@ -166,7 +166,7 @@ linemap_add (struct line_maps *set, enum lc_reason reason, the list is sorted and we can use a binary search. */ const struct line_map * -linemap_lookup (struct line_maps *set, unsigned int line) +linemap_lookup (struct line_maps *set, source_location line) { unsigned int md, mn = 0, mx = set->used; diff --git a/gcc/line-map.h b/gcc/line-map.h index b53f5e0..c57f51a 100644 --- a/gcc/line-map.h +++ b/gcc/line-map.h @@ -1,5 +1,5 @@ /* Map logical line numbers to (source file, line number) pairs. - Copyright (C) 2001 + Copyright (C) 2001, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it @@ -32,8 +32,9 @@ enum lc_reason {LC_ENTER = 0, LC_LEAVE, LC_RENAME}; /* A logical line number, i,e, an "index" into a line_map. */ /* Long-term, we want to use this to replace struct location_s (in input.h), - and effectively typedef fileline location_t. */ -typedef unsigned int fileline; + and effectively typedef source_location location_t. */ +typedef unsigned int source_location; +typedef source_location fileline; /* deprecated name */ /* The logical line FROM_LINE maps to physical source file TO_FILE at line TO_LINE, and subsequently one-to-one until the next line_map @@ -47,7 +48,7 @@ struct line_map { const char *to_file; unsigned int to_line; - fileline from_line; + source_location from_line; int included_from; ENUM_BITFIELD (lc_reason) reason : CHAR_BIT; unsigned char sysp; @@ -92,11 +93,12 @@ extern void linemap_free (struct line_maps *); maps, so any stored line_map pointers should not be used. */ extern const struct line_map *linemap_add (struct line_maps *, enum lc_reason, unsigned int sysp, - fileline from_line, const char *to_file, unsigned int to_line); + source_location from_line, const char *to_file, unsigned int to_line); /* Given a logical line, returns the map from which the corresponding (source file, line) pair can be deduced. */ -extern const struct line_map *linemap_lookup (struct line_maps *, fileline); +extern const struct line_map *linemap_lookup + (struct line_maps *, source_location); /* Print the file names and line numbers of the #include commands which led to the map MAP, if any, to stderr. Nothing is output if |