aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2013-08-25 11:43:34 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2013-08-25 09:43:34 +0000
commit5b1e7435771231fbc8b3fcd0ca2b85275889ac52 (patch)
tree07e2304f79df66dbf9a31e2877013e03804fd9e7 /gcc/tree.h
parent0691175fe28c07b0dd6f619bbb9a20a0e1f055b7 (diff)
downloadgcc-5b1e7435771231fbc8b3fcd0ca2b85275889ac52.zip
gcc-5b1e7435771231fbc8b3fcd0ca2b85275889ac52.tar.gz
gcc-5b1e7435771231fbc8b3fcd0ca2b85275889ac52.tar.bz2
tree.h (TYPE_FINAL_P, [...]): New macros.
* tree.h (TYPE_FINAL_P, DECL_FINAL_P): New macros. (tree_decl_with_vis): Add FINAL field. * cp-tree.h (struct lang_type_class): Free is_final bit. (CLASSTYPE_FINAL): Define using TYPE_FINAL_P. (DECL_FINAL_P): Remove. * pt.c (instantiate_class_template_1): Guard that CLASSTYPE_FINAL is called on CLASS_TYPE_P. From-SVN: r201975
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 84bd699..6092128 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -715,6 +715,9 @@ struct GTY(()) tree_base {
DECL_NONLOCAL_FRAME in
VAR_DECL
+
+ TYPE_FINAL_P in
+ RECORD_TYPE, UNION_TYPE and QUAL_UNION_TYPE
*/
struct GTY(()) tree_typed {
@@ -2314,6 +2317,10 @@ enum cv_qualifier
#define TYPE_CONTAINS_PLACEHOLDER_INTERNAL(NODE) \
(TYPE_CHECK (NODE)->type_common.contains_placeholder_bits)
+/* Nonzero if RECORD_TYPE represents a final derivation of class. */
+#define TYPE_FINAL_P(NODE) \
+ (RECORD_OR_UNION_CHECK (NODE)->base.default_def_flag)
+
/* The debug output functions use the symtab union field to store
information specific to the debugging format. The different debug
output hooks store different types in the union field. These three
@@ -3224,7 +3231,9 @@ struct GTY(()) tree_decl_with_vis {
unsigned init_priority_p : 1;
/* Used by C++ only. Might become a generic decl flag. */
unsigned shadowed_for_var_p : 1;
- /* 14 unused bits. */
+ /* Belong to FUNCTION_DECL exclusively. */
+ unsigned final : 1;
+ /* 13 unused bits. */
};
extern tree decl_debug_expr_lookup (tree);
@@ -3474,6 +3483,11 @@ extern vec<tree, va_gc> **decl_debug_args_insert (tree);
#define DECL_FUNCTION_VERSIONED(NODE)\
(FUNCTION_DECL_CHECK (NODE)->function_decl.versioned_function)
+/* In FUNCTION_DECL that represent an virtual method this is set when
+ the method is final. */
+#define DECL_FINAL_P(NODE)\
+ (FUNCTION_DECL_CHECK (NODE)->decl_with_vis.final)
+
/* FUNCTION_DECL inherits from DECL_NON_COMMON because of the use of the
arguments/result/saved_tree fields by front ends. It was either inherit
FUNCTION_DECL from non_common, or inherit non_common from FUNCTION_DECL,