Put hashtab_chk_error into hash-table.c.

2019-06-25  Martin Liska  <mliska@suse.cz>

	* hash-table.c (hashtab_chk_error): Move here from ...
	* hash-table.h (hashtab_chk_error): ... here.

From-SVN: r272655
This commit is contained in:
Martin Liska 2019-06-25 16:34:25 +02:00 committed by Martin Liska
parent bc2687dd94
commit 27bb6f7c47
3 changed files with 19 additions and 12 deletions

View File

@ -1,3 +1,8 @@
2019-06-25 Martin Liska <mliska@suse.cz>
* hash-table.c (hashtab_chk_error): Move here from ...
* hash-table.h (hashtab_chk_error): ... here.
2019-06-25 Martin Liska <mliska@suse.cz>
PR tree-optimization/90978

View File

@ -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 ();
}

View File

@ -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<Descriptor, Lazy, Allocator>
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. */