aboutsummaryrefslogtreecommitdiff
path: root/libcpp/line-map.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp/line-map.c')
-rw-r--r--libcpp/line-map.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/libcpp/line-map.c b/libcpp/line-map.c
index c5c42f0..c98ee45 100644
--- a/libcpp/line-map.c
+++ b/libcpp/line-map.c
@@ -57,6 +57,14 @@ static source_location linemap_macro_loc_to_exp_point (struct line_maps *,
extern unsigned num_expanded_macros_counter;
extern unsigned num_macro_tokens_counter;
+/* Destructor for class line_maps.
+ Ensure non-GC-managed memory is released. */
+
+line_maps::~line_maps ()
+{
+ htab_delete (location_adhoc_data_map.htab);
+}
+
/* Hash function for location_adhoc_data hashtable. */
static hashval_t
@@ -333,13 +341,6 @@ get_pure_location (line_maps *set, source_location loc)
return loc & ~((1 << ordmap->m_range_bits) - 1);
}
-/* Finalize the location_adhoc_data structure. */
-void
-location_adhoc_data_fini (struct line_maps *set)
-{
- htab_delete (set->location_adhoc_data_map.htab);
-}
-
/* Initialize a line map set. */
void