diff options
author | Nathan Sidwell <nathan@gcc.gnu.org> | 2017-06-16 14:33:45 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2017-06-16 14:33:45 +0000 |
commit | 6a2dfd9a66a678b26c762d0fc614fea267ea706b (patch) | |
tree | 71512245eb8338397e64115e91116c5af543c327 /gcc/cp/cp-tree.h | |
parent | 8c1ca7ee3a35bf00201c6a82ccd5b663575328a7 (diff) | |
download | gcc-6a2dfd9a66a678b26c762d0fc614fea267ea706b.zip gcc-6a2dfd9a66a678b26c762d0fc614fea267ea706b.tar.gz gcc-6a2dfd9a66a678b26c762d0fc614fea267ea706b.tar.bz2 |
Make keyed_classes a vector.
* cp-tree.h (CPTI_KEYED_CLASSES, keyed_classes): Delete.
(keyed_classes): Declare as vector.
* decl.c (keyed_classes): Define.
(cxx_init_decl_processing): Allocate it.
(record_key_method_defined): Use vec_safe_push.
* class.c (finish_struct_1): Likewise.
* pt.c (instantiate_class_template_1): Likewise.
* decl2.c (c_parse_final_cleanups): Reverse iterate keyed_classes.
From-SVN: r249263
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r-- | gcc/cp/cp-tree.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 5dd6023..1125073 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -169,8 +169,6 @@ enum cp_tree_index CPTI_DSO_HANDLE, CPTI_DCAST, - CPTI_KEYED_CLASSES, - CPTI_NULLPTR, CPTI_NULLPTR_TYPE, @@ -290,11 +288,6 @@ extern GTY(()) tree cp_global_trees[CPTI_MAX]; destructors. */ #define vtt_parm_type cp_global_trees[CPTI_VTT_PARM_TYPE] -/* A TREE_LIST of the dynamic classes whose vtables may have to be - emitted in this translation unit. */ - -#define keyed_classes cp_global_trees[CPTI_KEYED_CLASSES] - /* A node which matches any template argument. */ #define any_targ_node cp_global_trees[CPTI_ANY_TARG] @@ -5107,6 +5100,10 @@ extern GTY(()) vec<tree, va_gc> *local_classes; /* An array of static vars & fns. */ extern GTY(()) vec<tree, va_gc> *static_decls; +/* An array of vtable-needing types that have no key function, or have + an emitted key function. */ +extern GTY(()) vec<tree, va_gc> *keyed_classes; + /* Here's where we control how name mangling takes place. */ |