diff options
author | Patrick Palka <ppalka@redhat.com> | 2023-04-26 15:43:26 -0400 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2023-04-26 15:43:26 -0400 |
commit | 50d866038a910ceb9075b97295a12d77a8d09a3a (patch) | |
tree | 358466575258f34da5a3cc0a918baa8cb7956fb3 /libgcc | |
parent | 0a38f677463ff8a4fb61b049263aa596ef6471a7 (diff) | |
download | gcc-50d866038a910ceb9075b97295a12d77a8d09a3a.zip gcc-50d866038a910ceb9075b97295a12d77a8d09a3a.tar.gz gcc-50d866038a910ceb9075b97295a12d77a8d09a3a.tar.bz2 |
c++: micro-optimize most_specialized_partial_spec
This introduces an early exit test to most_specialized_partial_spec for
templates which have no partial specializations, saving some unnecessary
work during class template instantiation in the common case. In passing,
modernize the code a bit.
gcc/cp/ChangeLog:
* pt.cc (most_specialized_partial_spec): Exit early when
DECL_TEMPLATE_SPECIALIZATIONS is empty. Move local variable
declarations closer to their first use. Remove redundant
flag_concepts test. Remove redundant forward declaration.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions