Commit 48f8fefe by Martin Liska Committed by Martin Liska

Fix build with --enable-gather-detailed-mem-stats.

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

	* hash-map.h: Pass default value to hash_table ctor.
	* hash-table.h: Add default value to call of a ctor.

From-SVN: r272104
parent 027c94b8
2019-06-10 Martin Liska <mliska@suse.cz>
* hash-map.h: Pass default value to hash_table ctor.
* hash-table.h: Add default value to call of a ctor.
2019-06-08 Jonathan Wakely <jwakely@redhat.com> 2019-06-08 Jonathan Wakely <jwakely@redhat.com>
* doc/invoke.texi (C Dialect Options): Minor grammatical change. * doc/invoke.texi (C Dialect Options): Minor grammatical change.
......
...@@ -120,12 +120,14 @@ public: ...@@ -120,12 +120,14 @@ public:
explicit hash_map (size_t n = 13, bool ggc = false, explicit hash_map (size_t n = 13, bool ggc = false,
bool gather_mem_stats = GATHER_STATISTICS bool gather_mem_stats = GATHER_STATISTICS
CXX_MEM_STAT_INFO) CXX_MEM_STAT_INFO)
: m_table (n, ggc, gather_mem_stats, HASH_MAP_ORIGIN PASS_MEM_STAT) {} : m_table (n, ggc, true, gather_mem_stats, HASH_MAP_ORIGIN PASS_MEM_STAT)
{
}
explicit hash_map (const hash_map &h, bool ggc = false, explicit hash_map (const hash_map &h, bool ggc = false,
bool gather_mem_stats = GATHER_STATISTICS bool gather_mem_stats = GATHER_STATISTICS
CXX_MEM_STAT_INFO) CXX_MEM_STAT_INFO)
: m_table (h.m_table, ggc, gather_mem_stats, : m_table (h.m_table, ggc, true, gather_mem_stats,
HASH_MAP_ORIGIN PASS_MEM_STAT) {} HASH_MAP_ORIGIN PASS_MEM_STAT) {}
/* Create a hash_map in ggc memory. */ /* Create a hash_map in ggc memory. */
......
...@@ -389,7 +389,7 @@ public: ...@@ -389,7 +389,7 @@ public:
create_ggc (size_t n CXX_MEM_STAT_INFO) create_ggc (size_t n CXX_MEM_STAT_INFO)
{ {
hash_table *table = ggc_alloc<hash_table> (); hash_table *table = ggc_alloc<hash_table> ();
new (table) hash_table (n, true, GATHER_STATISTICS, new (table) hash_table (n, true, true, GATHER_STATISTICS,
HASH_TABLE_ORIGIN PASS_MEM_STAT); HASH_TABLE_ORIGIN PASS_MEM_STAT);
return table; return table;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment