aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.h
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2010-06-07 16:42:37 -0400
committerJason Merrill <jason@gcc.gnu.org>2010-06-07 16:42:37 -0400
commit01628e543b8867e4c4ca5724d4982caae7f0bc1a (patch)
tree162d7f5ea6f6051c882ece33106ad652f869918c /gcc/cp/cp-tree.h
parent55cdb6b69069481ecf19ff07d0ebb23208bc8162 (diff)
downloadgcc-01628e543b8867e4c4ca5724d4982caae7f0bc1a.zip
gcc-01628e543b8867e4c4ca5724d4982caae7f0bc1a.tar.gz
gcc-01628e543b8867e4c4ca5724d4982caae7f0bc1a.tar.bz2
cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
* cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro. * init.c (build_offset_ref): Use it. * pt.c (maybe_process_partial_specialization): Use it. (instantiate_class_template): Use it. * search.c (lookup_base): Use it. From-SVN: r160398
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r--gcc/cp/cp-tree.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 5efe279..f507a21 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -1433,6 +1433,11 @@ struct GTY(()) lang_type {
starting the definition of this type has been seen. */
#define TYPE_BEING_DEFINED(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->being_defined)
+/* Nonzero means that this type is either complete or being defined, so we
+ can do lookup in it. */
+#define COMPLETE_OR_OPEN_TYPE_P(NODE) \
+ (COMPLETE_TYPE_P (NODE) || (CLASS_TYPE_P (NODE) && TYPE_BEING_DEFINED (NODE)))
+
/* Mark bits for repeated base checks. */
#define TYPE_MARKED_P(NODE) TREE_LANG_FLAG_6 (TYPE_CHECK (NODE))