diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2015-11-17 18:41:55 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2015-11-17 18:41:55 +0000 |
commit | 6bac43d760cdced2775cb17add346f757ee6f045 (patch) | |
tree | 5e9bc873dd49d3dfdd8631708321cbf4a109a760 /gcc/hash-set.h | |
parent | 4959a752881b69064fb988df23c10e14827099e9 (diff) | |
download | gcc-6bac43d760cdced2775cb17add346f757ee6f045.tar.gz |
Add gencfn-macros.c
This patch automatically generates case macros such as:
CASE_CFN_SQRT
for each {F,,L} floating-point built-in function and each {,L,LL,IMAX}
integer built-in function. The macros match the same built-in
functions as CASE_FLT_FN and CASE_INT_FN but in addition include
the associated internal function, if any.
The idea is to make sure that users of combined_fn don't need to know
which built-in functions have internal-function equivalents. If we add
a new function to internal-fn.def, all combined_fn users should pick it
up automatically.
The generator wants to use "hash_set <nofree_string_hash>",
so the patch follows hash_map in using the types given by the
traits as the key. This is a no-op for current users of hash_set.
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
gcc/
* Makefile.in (HASH_TABLE_H): Add GGC_H.
(MOSTLYCLEANFILES, generated_files): Add case-fn-macros.h.
(s-case-cfn-macros, case-cfn-macros.h, build/gencfn-macros.o)
(build/gencfn-macros$(build_exeext): New rules.
(genprogerr): Add cfn-macros.
* hash-set.h (hash_set): Use the traits value_type as the key.
* gencfn-macros.c: New file.
From-SVN: r230476
Diffstat (limited to 'gcc/hash-set.h')
-rw-r--r-- | gcc/hash-set.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/hash-set.h b/gcc/hash-set.h index e85af2a1745..679d2b6df64 100644 --- a/gcc/hash-set.h +++ b/gcc/hash-set.h @@ -21,10 +21,11 @@ along with GCC; see the file COPYING3. If not see #ifndef hash_set_h #define hash_set_h -template<typename Key, typename Traits = default_hash_traits<Key> > +template<typename KeyId, typename Traits = default_hash_traits<KeyId> > class hash_set { public: + typedef typename Traits::value_type Key; explicit hash_set (size_t n = 13, bool ggc = false CXX_MEM_STAT_INFO) : m_table (n, ggc, true, HASH_SET_ORIGIN PASS_MEM_STAT) {} |