aboutsummaryrefslogtreecommitdiff
path: root/libcpp/include/line-map.h
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2021-09-13 19:49:49 +0200
committerThomas Koenig <tkoenig@gcc.gnu.org>2021-09-13 19:49:49 +0200
commitb18a97e5dd0935e1c4a626c230f21457d0aad3d5 (patch)
treec1818f41af6fe780deafb6cd6a183f32085fe654 /libcpp/include/line-map.h
parente76a53644c9d70e998c0d050e9a456af388c6b61 (diff)
downloadgcc-b18a97e5dd0935e1c4a626c230f21457d0aad3d5.zip
gcc-b18a97e5dd0935e1c4a626c230f21457d0aad3d5.tar.gz
gcc-b18a97e5dd0935e1c4a626c230f21457d0aad3d5.tar.bz2
Merged current trunk to branch.
Diffstat (limited to 'libcpp/include/line-map.h')
-rw-r--r--libcpp/include/line-map.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h
index 50b2e4f..464494b 100644
--- a/libcpp/include/line-map.h
+++ b/libcpp/include/line-map.h
@@ -1,5 +1,5 @@
/* Map (unsigned int) keys to (source file, line, column) triples.
- Copyright (C) 2001-2020 Free Software Foundation, Inc.
+ Copyright (C) 2001-2021 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -563,7 +563,7 @@ struct GTY((tag ("2"))) line_map_macro : public line_map {
#define linemap_assert_fails(EXPR) (! (EXPR))
#endif
-/* Get whether location LOC is an ad-hoc, ordinary or macro location. */
+/* Get whether location LOC is an ordinary location. */
inline bool
IS_ORDINARY_LOC (location_t loc)
@@ -571,18 +571,14 @@ IS_ORDINARY_LOC (location_t loc)
return loc < LINE_MAP_MAX_LOCATION;
}
+/* Get whether location LOC is an ad-hoc location. */
+
inline bool
IS_ADHOC_LOC (location_t loc)
{
return loc > MAX_LOCATION_T;
}
-inline bool
-IS_MACRO_LOC (location_t loc)
-{
- return !IS_ORDINARY_LOC (loc) && !IS_ADHOC_LOC (loc);
-}
-
/* Categorize line map kinds. */
inline bool
@@ -1136,8 +1132,9 @@ extern location_t linemap_module_loc
extern void linemap_module_reparent
(line_maps *, location_t loc, location_t new_parent);
-/* Restore the linemap state such that the map at LWM-1 continues. */
-extern void linemap_module_restore
+/* Restore the linemap state such that the map at LWM-1 continues.
+ Return start location of the new map. */
+extern unsigned linemap_module_restore
(line_maps *, unsigned lwm);
/* Given a logical source location, returns the map which the
@@ -1673,6 +1670,12 @@ class rich_location
/* Destructor. */
~rich_location ();
+ /* The class manages the memory pointed to by the elements of
+ the M_FIXIT_HINTS vector and is not meant to be copied or
+ assigned. */
+ rich_location (const rich_location &) = delete;
+ void operator= (const rich_location &) = delete;
+
/* Accessors. */
location_t get_loc () const { return get_loc (0); }
location_t get_loc (unsigned int idx) const;