public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-4480] libcpp: eliminate LINEMAPS_{ORDINARY,MACRO}_MAPS
@ 2023-10-08 22:51 David Malcolm
0 siblings, 0 replies; only message in thread
From: David Malcolm @ 2023-10-08 22:51 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:0a0ceb7a72fe0b7582bed40974e3ed374b2e5204
commit r14-4480-g0a0ceb7a72fe0b7582bed40974e3ed374b2e5204
Author: David Malcolm <dmalcolm@redhat.com>
Date: Sun Oct 8 18:43:17 2023 -0400
libcpp: eliminate LINEMAPS_{ORDINARY,MACRO}_MAPS
libcpp/ChangeLog:
* include/line-map.h (LINEMAPS_ORDINARY_MAPS): Delete.
(LINEMAPS_MACRO_MAPS): Delete.
* line-map.cc (linemap_tracks_macro_expansion_locs_p): Update for
deletion of LINEMAPS_MACRO_MAPS.
(linemap_get_statistics): Likewise.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diff:
---
libcpp/include/line-map.h | 16 ----------------
libcpp/line-map.cc | 4 ++--
2 files changed, 2 insertions(+), 18 deletions(-)
diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h
index 30f2284b5d1..cb934e6b9b3 100644
--- a/libcpp/include/line-map.h
+++ b/libcpp/include/line-map.h
@@ -928,14 +928,6 @@ LINEMAPS_LAST_MAP (const line_maps *set, bool map_kind)
LINEMAPS_USED (set, map_kind) - 1);
}
-/* Returns a pointer to the memory region where ordinary maps are
- allocated in the line table SET. */
-inline line_map_ordinary *
-LINEMAPS_ORDINARY_MAPS (const line_maps *set)
-{
- return set->info_ordinary.maps;
-}
-
/* Returns the INDEXth ordinary map. */
inline line_map_ordinary *
LINEMAPS_ORDINARY_MAP_AT (const line_maps *set, int index)
@@ -968,14 +960,6 @@ LINEMAPS_LAST_ORDINARY_MAP (const line_maps *set)
return (line_map_ordinary *)LINEMAPS_LAST_MAP (set, false);
}
-/* Returns a pointer to the beginning of the region where macro maps
- are allocated. */
-inline line_map_macro *
-LINEMAPS_MACRO_MAPS (const line_maps *set)
-{
- return set->info_macro.maps;
-}
-
/* Returns the INDEXth macro map. */
inline line_map_macro *
LINEMAPS_MACRO_MAP_AT (const line_maps *set, int index)
diff --git a/libcpp/line-map.cc b/libcpp/line-map.cc
index 385d54c53b7..cd173530149 100644
--- a/libcpp/line-map.cc
+++ b/libcpp/line-map.cc
@@ -738,7 +738,7 @@ linemap_module_restore (line_maps *set, unsigned lwm)
bool
linemap_tracks_macro_expansion_locs_p (const line_maps *set)
{
- return LINEMAPS_MACRO_MAPS (set) != NULL;
+ return set->info_macro.maps != nullptr;
}
/* Create a macro map. A macro map encodes source locations of tokens
@@ -2076,7 +2076,7 @@ linemap_get_statistics (const line_maps *set,
macro_maps_allocated_size =
LINEMAPS_MACRO_ALLOCATED (set) * sizeof (struct line_map_macro);
- for (cur_map = LINEMAPS_MACRO_MAPS (set);
+ for (cur_map = set->info_macro.maps;
cur_map && cur_map <= LINEMAPS_LAST_MACRO_MAP (set);
++cur_map)
{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-10-08 22:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-08 22:51 [gcc r14-4480] libcpp: eliminate LINEMAPS_{ORDINARY,MACRO}_MAPS David Malcolm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).