Commit 7d40b45f by Per Bothner

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
parent 5849d27c
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,
......
/* 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;
......
/* 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment