diff options
author | Ulrich Drepper <drepper@gmail.com> | 2022-08-30 16:33:51 +0200 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2022-08-30 16:33:51 +0200 |
commit | 0c92f895e0b92b8057b84f8584873258760d227b (patch) | |
tree | f08fb4ccea13c9a7a1dd80c0957c7ff4226da3cc /gcc/cp/Make-lang.in | |
parent | 1ddf31af2f3fbfba45882a95dd6eb81bae59f90a (diff) | |
download | gcc-0c92f895e0b92b8057b84f8584873258760d227b.zip gcc-0c92f895e0b92b8057b84f8584873258760d227b.tar.gz gcc-0c92f895e0b92b8057b84f8584873258760d227b.tar.bz2 |
Change get_std_name_hint to use generated hash table
The get_std_name_hint function so far uses linear search to locate
matching entries. After adding more hint entries this might not be
appropriate anymore. Therefore this patch also replaces the linear
array with a gperf-generated hash table.
contrib/ChangeLog
* gcc_update (files_and_dependencies): Add rule for
gcc/cp/std-name-hint.h.
gcc/cp/ChangeLog
* Make-lang.in: Add rule to rebuild std-name-hint.h from
std-name-hint.gperf.
* name-lookup.cc (get_std_name_hint): Remove hints array.
Use gperf-generated class std_name_hint_lookup.
Include "std-name-hint.h".
* std-name-hint.gperf: New file.
* std-name-hint.h: New file. Generated from the .gperf file.
Diffstat (limited to 'gcc/cp/Make-lang.in')
-rw-r--r-- | gcc/cp/Make-lang.in | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in index 23d98c8..38d8eee 100644 --- a/gcc/cp/Make-lang.in +++ b/gcc/cp/Make-lang.in @@ -153,6 +153,15 @@ endif gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \ $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h +# The same procedure for the std-name-hint.gperf file. +ifeq ($(ENABLE_MAINTAINER_RULES), true) +$(srcdir)/cp/std-name-hint.h: $(srcdir)/cp/std-name-hint.gperf +else +$(srcdir)/cp/std-name-hint.h: +endif + gperf -o -C -E -k '1,2,7,11,$$' -D -N find -L C++ \ + $(srcdir)/cp/std-name-hint.gperf --output-file $(srcdir)/cp/std-name-hint.h + cc1plus.fda: ../stage1-gcc/cc1plus$(exeext) ../prev-gcc/$(PERF_DATA) $(CREATE_GCOV) -binary ../stage1-gcc/cc1plus$(exeext) -gcov cc1plus.fda -profile ../prev-gcc/$(PERF_DATA) -gcov_version 1 |