diff options
author | Nathan Sidwell <nathan@acm.org> | 2020-05-13 13:17:25 -0700 |
---|---|---|
committer | Nathan Sidwell <nathan@acm.org> | 2020-05-13 13:17:25 -0700 |
commit | 2bb30de62f59caa9af1ec01aa1029795f4748842 (patch) | |
tree | 8c1e10dc8086a99eea0a7a8f0b1cfcd4f7f08bce /gcc/c | |
parent | 833c7b4b5ef071bc3c5c79108baff55f2bcaaac3 (diff) | |
download | gcc-2bb30de62f59caa9af1ec01aa1029795f4748842.zip gcc-2bb30de62f59caa9af1ec01aa1029795f4748842.tar.gz gcc-2bb30de62f59caa9af1ec01aa1029795f4748842.tar.bz2 |
c++: Simplify typedef access checking
I discovered that the template typedef access check was rather more
expensive than needed. The call of get_types_needed_access_check in
the FOR_EACH_VEC_SAFE_ELT is the moral equivalent of 'for (size_t pos
= 0; pos != strlen (string); pos++)'. Let's not do that.
* pt.c (perform_typedefs_access_check): Cache expensively
calculated object references.
(check_auto_in_tmpl_args): Just assert we do not get unexpected
nodes, rather than silently do nothing.
(append_type_to_template_for_access): Likewise, cache expensie
object reference.
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions