aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2013-08-26 13:42:03 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2013-08-26 11:42:03 +0000
commit0f9aaac79ed0b5348ea80cd325a04406bbf4ca7d (patch)
treee9f1a76e7f06dbff4df1301317efffbb2ccbbfac /gcc/tree.h
parent4b37444e7193b7df8ab9c00532598dff98bff49d (diff)
downloadgcc-0f9aaac79ed0b5348ea80cd325a04406bbf4ca7d.zip
gcc-0f9aaac79ed0b5348ea80cd325a04406bbf4ca7d.tar.gz
gcc-0f9aaac79ed0b5348ea80cd325a04406bbf4ca7d.tar.bz2
tree.h (tree_decl_with_vis): Add cxx_constructor, cxx_destructor.
* tree.h (tree_decl_with_vis): Add cxx_constructor, cxx_destructor. (DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P): New macros. * cp-tree.h (DECL_CONSTRUCTOR_P, DECL_DESTRUCTOR_P): Use middle-end flag. From-SVN: r201994
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 6092128..1492f6c 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -3232,8 +3232,12 @@ struct GTY(()) tree_decl_with_vis {
/* Used by C++ only. Might become a generic decl flag. */
unsigned shadowed_for_var_p : 1;
/* Belong to FUNCTION_DECL exclusively. */
+ unsigned cxx_constructor : 1;
+ /* Belong to FUNCTION_DECL exclusively. */
+ unsigned cxx_destructor : 1;
+ /* Belong to FUNCTION_DECL exclusively. */
unsigned final : 1;
- /* 13 unused bits. */
+ /* 11 unused bits. */
};
extern tree decl_debug_expr_lookup (tree);
@@ -3483,6 +3487,18 @@ 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, this is set if this function is a C++ constructor.
+ Devirtualization machinery uses this knowledge for determing type of the
+ object constructed. Also we assume that constructor address is not
+ important. */
+#define DECL_CXX_CONSTRUCTOR_P(NODE)\
+ (FUNCTION_DECL_CHECK (NODE)->decl_with_vis.cxx_constructor)
+
+/* In FUNCTION_DECL, this is set if this function is a C++ destructor.
+ Devirtualization machinery uses this to track types in destruction. */
+#define DECL_CXX_DESTRUCTOR_P(NODE)\
+ (FUNCTION_DECL_CHECK (NODE)->decl_with_vis.cxx_destructor)
+
/* In FUNCTION_DECL that represent an virtual method this is set when
the method is final. */
#define DECL_FINAL_P(NODE)\