summaryrefslogtreecommitdiff
path: root/libcpp/include/line-map.h
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp/include/line-map.h')
-rw-r--r--libcpp/include/line-map.h70
1 files changed, 35 insertions, 35 deletions
diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h
index 3961b636e23..bde5e533c2b 100644
--- a/libcpp/include/line-map.h
+++ b/libcpp/include/line-map.h
@@ -592,14 +592,14 @@ MAP_ORDINARY_P (const line_map *map)
/* Return TRUE if MAP encodes locations coming from a macro
replacement-list at macro expansion point. */
bool
-linemap_macro_expansion_map_p (const struct line_map *);
+linemap_macro_expansion_map_p (const line_map *);
/* Assert that MAP encodes locations of tokens that are not part of
the replacement-list of a macro expansion, downcasting from
line_map * to line_map_ordinary *. */
inline line_map_ordinary *
-linemap_check_ordinary (struct line_map *map)
+linemap_check_ordinary (line_map *map)
{
linemap_assert (MAP_ORDINARY_P (map));
return (line_map_ordinary *)map;
@@ -610,7 +610,7 @@ linemap_check_ordinary (struct line_map *map)
const line_map * to const line_map_ordinary *. */
inline const line_map_ordinary *
-linemap_check_ordinary (const struct line_map *map)
+linemap_check_ordinary (const line_map *map)
{
linemap_assert (MAP_ORDINARY_P (map));
return (const line_map_ordinary *)map;
@@ -1051,12 +1051,12 @@ LINEMAPS_LAST_ALLOCATED_MACRO_MAP (const line_maps *set)
return (line_map_macro *)LINEMAPS_LAST_ALLOCATED_MAP (set, true);
}
-extern location_t get_combined_adhoc_loc (struct line_maps *,
+extern location_t get_combined_adhoc_loc (class line_maps *,
location_t,
source_range,
void *);
-extern void *get_data_from_adhoc_loc (const struct line_maps *, location_t);
-extern location_t get_location_from_adhoc_loc (const struct line_maps *,
+extern void *get_data_from_adhoc_loc (const line_maps *, location_t);
+extern location_t get_location_from_adhoc_loc (const line_maps *,
location_t);
extern source_range get_range_from_loc (line_maps *set, location_t loc);
@@ -1076,7 +1076,7 @@ extern location_t get_pure_location (line_maps *set,
/* Combine LOC and BLOCK, giving a combined adhoc location. */
inline location_t
-COMBINE_LOCATION_DATA (struct line_maps *set,
+COMBINE_LOCATION_DATA (class line_maps *set,
location_t loc,
source_range src_range,
void *block)
@@ -1084,18 +1084,18 @@ COMBINE_LOCATION_DATA (struct line_maps *set,
return get_combined_adhoc_loc (set, loc, src_range, block);
}
-extern void rebuild_location_adhoc_htab (struct line_maps *);
+extern void rebuild_location_adhoc_htab (class line_maps *);
/* Initialize a line map set. SET is the line map set to initialize
and BUILTIN_LOCATION is the special location value to be used as
spelling location for built-in tokens. This BUILTIN_LOCATION has
to be strictly less than RESERVED_LOCATION_COUNT. */
-extern void linemap_init (struct line_maps *set,
+extern void linemap_init (class line_maps *set,
location_t builtin_location);
/* Check for and warn about line_maps entered but not exited. */
-extern void linemap_check_files_exited (struct line_maps *);
+extern void linemap_check_files_exited (class line_maps *);
/* Return a location_t for the start (i.e. column==0) of
(physical) line TO_LINE in the current source file (as in the
@@ -1104,7 +1104,7 @@ extern void linemap_check_files_exited (struct line_maps *);
the highest_location). */
extern location_t linemap_line_start
-(struct line_maps *set, linenum_type to_line, unsigned int max_column_hint);
+(class line_maps *set, linenum_type to_line, unsigned int max_column_hint);
/* Add a mapping of logical source line to physical source file and
line number. This function creates an "ordinary map", which is a
@@ -1119,8 +1119,8 @@ extern location_t linemap_line_start
A call to this function can relocate the previous set of
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,
+extern const line_map *linemap_add
+ (class line_maps *, enum lc_reason, unsigned int sysp,
const char *to_file, linenum_type to_line);
/* Given a logical source location, returns the map which the
@@ -1129,12 +1129,12 @@ extern const struct line_map *linemap_add
monotonic increasing, and so the list is sorted and we can use a
binary search. If no line map have been allocated yet, this
function returns NULL. */
-extern const struct line_map *linemap_lookup
- (struct line_maps *, location_t);
+extern const line_map *linemap_lookup
+ (class line_maps *, location_t);
/* Returns TRUE if the line table set tracks token locations across
macro expansion, FALSE otherwise. */
-bool linemap_tracks_macro_expansion_locs_p (struct line_maps *);
+bool linemap_tracks_macro_expansion_locs_p (class line_maps *);
/* Return the name of the macro associated to MACRO_MAP. */
const char* linemap_map_get_macro_name (const line_map_macro *);
@@ -1148,17 +1148,17 @@ const char* linemap_map_get_macro_name (const line_map_macro *);
Note that this function returns 1 if LOCATION belongs to a token
that is part of a macro replacement-list defined in a system
header, but expanded in a non-system file. */
-int linemap_location_in_system_header_p (struct line_maps *,
+int linemap_location_in_system_header_p (class line_maps *,
location_t);
/* Return TRUE if LOCATION is a source code location of a token that is part of
a macro expansion, FALSE otherwise. */
-bool linemap_location_from_macro_expansion_p (const struct line_maps *,
+bool linemap_location_from_macro_expansion_p (const line_maps *,
location_t);
/* TRUE if LOCATION is a source code location of a token that is part of the
definition of a macro, FALSE otherwise. */
-bool linemap_location_from_macro_definition_p (struct line_maps *,
+bool linemap_location_from_macro_definition_p (class line_maps *,
location_t);
/* With the precondition that LOCATION is the locus of a token that is
@@ -1214,7 +1214,7 @@ MAIN_FILE_P (const line_map_ordinary *ord_map)
linemap_line_start, i.e, the last source line which a location was
encoded from. */
extern location_t
-linemap_position_for_column (struct line_maps *, unsigned int);
+linemap_position_for_column (class line_maps *, unsigned int);
/* Encode and return a source location from a given line and
column. */
@@ -1227,7 +1227,7 @@ linemap_position_for_line_and_column (line_maps *set,
shifting it by OFFSET columns. This function does not support
virtual locations. */
location_t
-linemap_position_for_loc_and_offset (struct line_maps *set,
+linemap_position_for_loc_and_offset (class line_maps *set,
location_t loc,
unsigned int offset);
@@ -1259,7 +1259,7 @@ LINEMAP_SYSP (const line_map_ordinary *ord_map)
comes before the token of POST, 0 if PRE denotes the location of
the same token as the token for POST, and a negative value
otherwise. */
-int linemap_compare_locations (struct line_maps *set,
+int linemap_compare_locations (class line_maps *set,
location_t pre,
location_t post);
@@ -1267,7 +1267,7 @@ int linemap_compare_locations (struct line_maps *set,
topogically before the token denoted by location LOC_B, or if they
are equal. */
inline bool
-linemap_location_before_p (struct line_maps *set,
+linemap_location_before_p (class line_maps *set,
location_t loc_a,
location_t loc_b)
{
@@ -1937,7 +1937,7 @@ enum location_resolution_kind
resolves to a location reserved for the client code, like
UNKNOWN_LOCATION or BUILTINS_LOCATION in GCC. */
-location_t linemap_resolve_location (struct line_maps *,
+location_t linemap_resolve_location (class line_maps *,
location_t loc,
enum location_resolution_kind lrk,
const line_map_ordinary **loc_map);
@@ -1949,9 +1949,9 @@ location_t linemap_resolve_location (struct line_maps *,
the point where M' was expanded. LOC_MAP is an output parameter.
When non-NULL, *LOC_MAP is set to the map of the returned
location. */
-location_t linemap_unwind_toward_expansion (struct line_maps *,
+location_t linemap_unwind_toward_expansion (class line_maps *,
location_t loc,
- const struct line_map **loc_map);
+ const line_map **loc_map);
/* If LOC is the virtual location of a token coming from the expansion
of a macro M and if its spelling location is reserved (e.g, a
@@ -1967,16 +1967,16 @@ location_t linemap_unwind_toward_expansion (struct line_maps *,
*MAP is set to the map of the returned location if the later is
different from LOC. */
-location_t linemap_unwind_to_first_non_reserved_loc (struct line_maps *,
+location_t linemap_unwind_to_first_non_reserved_loc (class line_maps *,
location_t loc,
- const struct line_map **map);
+ const line_map **map);
/* Expand source code location LOC and return a user readable source
code location. LOC must be a spelling (non-virtual) location. If
it's a location < RESERVED_LOCATION_COUNT a zeroed expanded source
location is returned. */
-expanded_location linemap_expand_location (struct line_maps *,
- const struct line_map *,
+expanded_location linemap_expand_location (class line_maps *,
+ const line_map *,
location_t loc);
/* Statistics about maps allocation and usage as returned by
@@ -2002,27 +2002,27 @@ struct linemap_stats
there is a line map in SET. FILE_NAME is the file name to
consider. If the function returns TRUE, *LOC is set to the highest
location emitted for that file. */
-bool linemap_get_file_highest_location (struct line_maps * set,
+bool linemap_get_file_highest_location (class line_maps * set,
const char *file_name,
location_t *loc);
/* Compute and return statistics about the memory consumption of some
parts of the line table SET. */
-void linemap_get_statistics (struct line_maps *, struct linemap_stats *);
+void linemap_get_statistics (line_maps *, struct linemap_stats *);
/* Dump debugging information about source location LOC into the file
stream STREAM. SET is the line map set LOC comes from. */
-void linemap_dump_location (struct line_maps *, location_t, FILE *);
+void linemap_dump_location (line_maps *, location_t, FILE *);
/* Dump line map at index IX in line table SET to STREAM. If STREAM
is NULL, use stderr. IS_MACRO is true if the caller wants to
dump a macro map, false otherwise. */
-void linemap_dump (FILE *, struct line_maps *, unsigned, bool);
+void linemap_dump (FILE *, line_maps *, unsigned, bool);
/* Dump line table SET to STREAM. If STREAM is NULL, stderr is used.
NUM_ORDINARY specifies how many ordinary maps to dump. NUM_MACRO
specifies how many macro maps to dump. */
-void line_table_dump (FILE *, struct line_maps *, unsigned int, unsigned int);
+void line_table_dump (FILE *, line_maps *, unsigned int, unsigned int);
/* An enum for distinguishing the various parts within a location_t. */