From 27bb6f7c4775b6dc554811eec9597511e2d38973 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 25 Jun 2019 16:34:25 +0200 Subject: [PATCH] Put hashtab_chk_error into hash-table.c. 2019-06-25 Martin Liska * hash-table.c (hashtab_chk_error): Move here from ... * hash-table.h (hashtab_chk_error): ... here. From-SVN: r272655 --- gcc/ChangeLog | 5 +++++ gcc/hash-table.c | 12 ++++++++++++ gcc/hash-table.h | 14 ++------------ 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 231bfe71035..da1fab46cb9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-06-25 Martin Liska + + * hash-table.c (hashtab_chk_error): Move here from ... + * hash-table.h (hashtab_chk_error): ... here. + 2019-06-25 Martin Liska PR tree-optimization/90978 diff --git a/gcc/hash-table.c b/gcc/hash-table.c index 8e86fffa36f..e3b5d3da09e 100644 --- a/gcc/hash-table.c +++ b/gcc/hash-table.c @@ -124,3 +124,15 @@ void dump_hash_table_loc_statistics (void) hash_table_usage ().dump (origin); } } + +/* Report a hash table checking error. */ + +ATTRIBUTE_NORETURN ATTRIBUTE_COLD +void +hashtab_chk_error () +{ + fprintf (stderr, "hash table checking failed: " + "equal operator returns true for a pair " + "of values with a different hash value\n"); + gcc_unreachable (); +} diff --git a/gcc/hash-table.h b/gcc/hash-table.h index 4f5e150a0ac..a39fb942158 100644 --- a/gcc/hash-table.h +++ b/gcc/hash-table.h @@ -303,6 +303,8 @@ extern unsigned int hash_table_sanitize_eq_limit; extern unsigned int hash_table_higher_prime_index (unsigned long n) ATTRIBUTE_PURE; +extern ATTRIBUTE_NORETURN ATTRIBUTE_COLD void hashtab_chk_error (); + /* Return X % Y using multiplicative inverse values INV and SHIFT. The multiplicative inverses computed above are for 32-bit types, @@ -1010,18 +1012,6 @@ hash_table return &m_entries[index]; } -/* Report a hash table checking error. */ - -ATTRIBUTE_NORETURN ATTRIBUTE_COLD -static void -hashtab_chk_error () -{ - fprintf (stderr, "hash table checking failed: " - "equal operator returns true for a pair " - "of values with a different hash value\n"); - gcc_unreachable (); -} - /* Verify that all existing elements in th hash table which are equal to COMPARABLE have an equal HASH value provided as argument. */ -- 2.30.2