aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2020-11-19 12:18:37 -0800
committerNathan Sidwell <nathan@acm.org>2020-11-19 12:21:31 -0800
commitbfc139e2b190187cb8478f8858cbce6ab9c5d4e7 (patch)
treeb7d9f708e52aa5409981b0af670c2aa0e1f605b0 /gcc/c
parent0862d007b564eca8c9a48fca0e689dd3f90db828 (diff)
downloadgcc-bfc139e2b190187cb8478f8858cbce6ab9c5d4e7.zip
gcc-bfc139e2b190187cb8478f8858cbce6ab9c5d4e7.tar.gz
gcc-bfc139e2b190187cb8478f8858cbce6ab9c5d4e7.tar.bz2
c++: Expose constexpr hash table
This patch exposes the constexpr hash table so that the modules machinery can save and load constexpr bodies. While there I noticed that we could do a little constification of the hasher and comparator functions. Also combine the saving machinery to a single function returning void -- nothing ever looked at its return value. gcc/cp/ * cp-tree.h (struct constexpr_fundef): Moved from constexpr.c. (maybe_save_constexpr_fundef): Declare. (register_constexpr_fundef): Take constexpr_fundef object, return void. * decl.c (mabe_save_function_definition): Delete, functionality moved to maybe_save_constexpr_fundef. (emit_coro_helper, finish_function): Adjust. * constexpr.c (struct constexpr_fundef): Moved to cp-tree.h. (constexpr_fundef_hasher::equal): Constify. (constexpr_fundef_hasher::hash): Constify. (retrieve_constexpr_fundef): Make non-static. (maybe_save_constexpr_fundef): Break out checking and duplication from ... (register_constexpr_fundef): ... here. Just register the constexpr.
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions