]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Dec 1999 00:19:01 +0000 (00:19 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Dec 1999 00:19:01 +0000 (00:19 +0000)
(TYPE_POLYMORPHIC_P): ... this.
(TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
(TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
(TREE_CALLS_NEW): Remove.
(TREE_MANGLED): Likewise.
* call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
and TYPE_POLYMORPHIC_P.
* class.c (check_bases): Likewise.
(finish_base_struct): Likewise.
(finish_struct_bits): Likewise.
(check_for_override): Likewise.
(finish_struct_1): Likewise.
(get_vfield_name): Likewise.
* decl.c (xref_basetypes): Likewise.
* decl2.c (import_export_class): Likewise.
(import_export_decl): Likewise.
* error.c (dump_function_decl): Likewise.
* pt.c (instantiate_class_template): Likewise.
* repo.c (repo_inline_used): Likewise.
* rtti.c (build_headof): Likewise.
(get_tinfo_fn_dynamic): Likewise.
(build_x_typeid): Likewise.
(get_tinfo_var): Likewise.
(build_dynamic_cast_1): Likewise.
(synthesize_tinfo_fn): Likewise.
* search.c (lookup_field_1): Likewise.
(dfs_debug_mark): Likewise.
(maybe_suppress_debug_info): Likewise.
* typeck.c (build_component_ref): Likewise.
(build_component_addr): Likewise.
* typeck2.c (process_init_constructor): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31041 138bc75d-0d04-0410-961f-82ee72b054a4

13 files changed:
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/class.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/error.c
gcc/cp/pt.c
gcc/cp/repo.c
gcc/cp/rtti.c
gcc/cp/search.c
gcc/cp/typeck.c
gcc/cp/typeck2.c

index 8c67559b7c38e3878a0869eed7f46418efc36e2c..2e23f2fd5a6a90e18645e90ea688da60c5f90f46 100644 (file)
@@ -1,3 +1,38 @@
+1999-12-20  Mark Mitchell  <mark@codesourcery.com>
+
+       * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
+       (TYPE_POLYMORPHIC_P): ... this.
+       (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
+       (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
+       (TREE_CALLS_NEW): Remove.
+       (TREE_MANGLED): Likewise.
+       * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
+       and TYPE_POLYMORPHIC_P.
+       * class.c (check_bases): Likewise.
+       (finish_base_struct): Likewise.
+       (finish_struct_bits): Likewise.
+       (check_for_override): Likewise.
+       (finish_struct_1): Likewise.
+       (get_vfield_name): Likewise.
+       * decl.c (xref_basetypes): Likewise.
+       * decl2.c (import_export_class): Likewise.
+       (import_export_decl): Likewise.
+       * error.c (dump_function_decl): Likewise.
+       * pt.c (instantiate_class_template): Likewise.
+       * repo.c (repo_inline_used): Likewise.
+       * rtti.c (build_headof): Likewise.
+       (get_tinfo_fn_dynamic): Likewise.
+       (build_x_typeid): Likewise.
+       (get_tinfo_var): Likewise.
+       (build_dynamic_cast_1): Likewise.
+       (synthesize_tinfo_fn): Likewise.
+       * search.c (lookup_field_1): Likewise.
+       (dfs_debug_mark): Likewise.
+       (maybe_suppress_debug_info): Likewise.
+       * typeck.c (build_component_ref): Likewise.
+       (build_component_addr): Likewise.
+       * typeck2.c (process_init_constructor): Likewise.
+       
 1999-12-20  Nathan Sidwell  <nathan@acm.org>
 
        * typeck.c (strip_all_pointer_quals): New static function.
index e597e53b10d57bb638e316e3049ff116b0b8f683..cfc6fd5c74541ab70cd95ff1d38a47267f17ab10 100644 (file)
@@ -111,7 +111,7 @@ build_vfield_ref (datum, type)
   if (TREE_CODE (TREE_TYPE (datum)) == REFERENCE_TYPE)
     datum = convert_from_reference (datum);
 
-  if (! TYPE_USES_COMPLEX_INHERITANCE (type))
+  if (! TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (type))
     rval = build (COMPONENT_REF, TREE_TYPE (TYPE_VFIELD (type)),
                  datum, TYPE_VFIELD (type));
   else
index f0a4b92a9749b0a06ea3ab17688df098ad7ee5f6..02b034aa416ddc8860e8f2cc9e868ff4f6d37fee 100644 (file)
@@ -1542,10 +1542,10 @@ check_bases (t, cant_have_default_ctor_p, cant_have_const_ctor_p,
          continue;
        }
 
-      /* Effective C++ rule 14.  We only need to check TYPE_VIRTUAL_P
+      /* Effective C++ rule 14.  We only need to check TYPE_POLYMORPHIC_P
         here because the case of virtual functions but non-virtual
         dtor is handled in finish_struct_1.  */
-      if (warn_ecpp && ! TYPE_VIRTUAL_P (basetype)
+      if (warn_ecpp && ! TYPE_POLYMORPHIC_P (basetype)
          && TYPE_HAS_DESTRUCTOR (basetype))
        cp_warning ("base class `%#T' has a non-virtual destructor",
                    basetype);
@@ -1584,6 +1584,7 @@ check_bases (t, cant_have_default_ctor_p, cant_have_const_ctor_p,
       TYPE_OVERLOADS_CALL_EXPR (t) |= TYPE_OVERLOADS_CALL_EXPR (basetype);
       TYPE_OVERLOADS_ARRAY_REF (t) |= TYPE_OVERLOADS_ARRAY_REF (basetype);
       TYPE_OVERLOADS_ARROW (t) |= TYPE_OVERLOADS_ARROW (basetype);
+      TYPE_POLYMORPHIC_P (t) |= TYPE_POLYMORPHIC_P (basetype);
 
       /* Derived classes can implicitly become COMified if their bases
         are COM.  */
@@ -1630,7 +1631,7 @@ finish_base_struct (t, b)
       tree base_binfo = TREE_VEC_ELT (binfos, i);
       tree basetype = BINFO_TYPE (base_binfo);
 
-      if (TYPE_VIRTUAL_P (basetype))
+      if (TYPE_POLYMORPHIC_P (basetype))
        {
          /* Ensure that this is set from at least a virtual base
              class.  */
@@ -1770,8 +1771,9 @@ finish_struct_bits (t, max_has_virtual)
       TYPE_NEEDS_CONSTRUCTING (variants) = TYPE_NEEDS_CONSTRUCTING (t);
       TYPE_NEEDS_DESTRUCTOR (variants) = TYPE_NEEDS_DESTRUCTOR (t);
 
-      TYPE_USES_COMPLEX_INHERITANCE (variants) = TYPE_USES_COMPLEX_INHERITANCE (t);
-      TYPE_VIRTUAL_P (variants) = TYPE_VIRTUAL_P (t);
+      TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (variants) 
+       = TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (t);
+      TYPE_POLYMORPHIC_P (variants) = TYPE_POLYMORPHIC_P (t);
       TYPE_USES_VIRTUAL_BASECLASSES (variants) = TYPE_USES_VIRTUAL_BASECLASSES (t);
       /* Copy whatever these are holding today.  */
       TYPE_MIN_VALUE (variants) = TYPE_MIN_VALUE (t);
@@ -2926,7 +2928,7 @@ check_for_override (decl, ctype)
   for (i = 0; i < n_baselinks; i++)
     {
       tree base_binfo = TREE_VEC_ELT (binfos, i);
-      if (TYPE_VIRTUAL_P (BINFO_TYPE (base_binfo)))
+      if (TYPE_POLYMORPHIC_P (BINFO_TYPE (base_binfo)))
        {
          tree tmp = get_matching_virtual
            (base_binfo, decl,
@@ -4290,21 +4292,22 @@ finish_struct_1 (t)
        = size_binop (PLUS_EXPR, offset, DECL_FIELD_BITPOS (vfield));
       TYPE_VFIELD (t) = vfield;
     }
+
+  /* If this vtbl pointer is new, add it to the list of vtbl
+     pointers in this class.  */
     
   if (has_virtual > max_has_virtual)
     max_has_virtual = has_virtual;
   if (max_has_virtual > 0)
-    TYPE_VIRTUAL_P (t) = 1;
+    TYPE_POLYMORPHIC_P (t) = 1;
 
-  if (flag_rtti && TYPE_VIRTUAL_P (t) && !pending_hard_virtuals)
+  if (flag_rtti && TYPE_POLYMORPHIC_P (t) && !pending_hard_virtuals)
     modify_all_vtables (t, NULL_TREE);
 
-  while (pending_hard_virtuals)
-    {
-      modify_all_vtables (t,
-                         TREE_VALUE (pending_hard_virtuals));
-      pending_hard_virtuals = TREE_CHAIN (pending_hard_virtuals);
-    }
+  for (pending_hard_virtuals = nreverse (pending_hard_virtuals);
+       pending_hard_virtuals;
+       pending_hard_virtuals = TREE_CHAIN (pending_hard_virtuals))
+    modify_all_vtables (t, TREE_VALUE (pending_hard_virtuals));
   
   if (TYPE_USES_VIRTUAL_BASECLASSES (t))
     {
@@ -5525,7 +5528,7 @@ get_vfield_name (type)
   char *buf;
 
   while (BINFO_BASETYPES (binfo)
-        && TYPE_VIRTUAL_P (BINFO_TYPE (BINFO_BASETYPE (binfo, 0)))
+        && TYPE_POLYMORPHIC_P (BINFO_TYPE (BINFO_BASETYPE (binfo, 0)))
         && ! TREE_VIA_VIRTUAL (BINFO_BASETYPE (binfo, 0)))
     binfo = BINFO_BASETYPE (binfo, 0);
 
index 8fd7bf39f0fedb64b1ba41a8f65d6f6d07942b4e..3708dfa60b9b8fa669f7ace206e8b417712aa7f2 100644 (file)
@@ -47,7 +47,7 @@ Boston, MA 02111-1307, USA.  */
       TEMPLATE_PARMS_FOR_INLINE.
       DELETE_EXPR_USE_VEC (in DELETE_EXPR).
       (TREE_CALLS_NEW) (in _EXPR or _REF) (commented-out).
-      TYPE_USES_COMPLEX_INHERITANCE (in _TYPE).
+      TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (in _TYPE).
       C_DECLARED_LABEL_FLAG (in LABEL_DECL)
       INHERITED_VALUE_BINDING_P (in CPLUS_BINDING)
       BASELINK_P (in TREE_LIST)
@@ -56,7 +56,7 @@ Boston, MA 02111-1307, USA.  */
    2: IDENTIFIER_OPNAME_P.
       BINFO_VBASE_MARKED.
       BINFO_FIELDS_MARKED.
-      TYPE_VIRTUAL_P.
+      TYPE_POLYMORHPIC_P (in _TYPE)
       ICS_THIS_FLAG (in _CONV)
       STMT_LINENO_FOR_FN_P (in _STMT)
       BINDING_HAS_LEVEL_P (in CPLUS_BINDING)
@@ -2065,40 +2065,16 @@ struct lang_decl
    using a twos-complement negated operand.  */
 #define TREE_NEGATED_INT(NODE) TREE_LANG_FLAG_0 (INTEGER_CST_CHECK (NODE))
 
-#if 0                          /* UNUSED */
-/* Nonzero in any kind of _EXPR or _REF node means that it is a call
-   to a storage allocation routine.  If, later, alternate storage
-   is found to hold the object, this call can be ignored.  */
-#define TREE_CALLS_NEW(NODE) (TREE_LANG_FLAG_1 (NODE))
-#endif
-
-/* Nonzero in any kind of _TYPE that uses multiple inheritance
-   or virtual baseclasses.  */
-#define TYPE_USES_COMPLEX_INHERITANCE(NODE) (TREE_LANG_FLAG_1 (NODE))
-
-#if 0                          /* UNUSED */
-/* Nonzero in IDENTIFIER_NODE means that this name is not the name the user
-   gave; it's a DECL_NESTED_TYPENAME.  Someone may want to set this on
-   mangled function names, too, but it isn't currently.  */
-#define TREE_MANGLED(NODE) (FOO)
-#endif
-
-#if 0                          /* UNUSED */
-/* Nonzero in IDENTIFIER_NODE means that this name is overloaded, and
-   should be looked up in a non-standard way.  */
-#define DECL_OVERLOADED(NODE) (FOO)
-#endif
+/* Nonzero in any kind of _TYPE where conversions to base-classes may
+   involve pointer arithmetic.  If this is zero, then converting to
+   a base-class never requires changing the value of the pointer.  */
+#define TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P(NODE) (TREE_LANG_FLAG_1 (NODE))
 
-/* Nonzero if this (non-TYPE)_DECL has its virtual attribute set.
-   For a FUNCTION_DECL, this is when the function is a virtual function.
-   For a VAR_DECL, this is when the variable is a virtual function table.
-   For a FIELD_DECL, when the field is the field for the virtual function table.
-   For an IDENTIFIER_NODE, nonzero if any function with this name
-   has been declared virtual.
+/* [class.virtual]
 
-   For a _TYPE if it uses virtual functions (or is derived from
-   one that does).  */
-#define TYPE_VIRTUAL_P(NODE) (TREE_LANG_FLAG_2 (NODE))
+   A class that declares or inherits a virtual function is called a
+   polymorphic class.  */
+#define TYPE_POLYMORPHIC_P(NODE) (TREE_LANG_FLAG_2 (NODE))
 
 extern int flag_new_for_scope;
 
index 8ef1d4f68cda6898b5f0beaa210d7e424e74fb9c..db44737cc13a5b08a9d6bd2c4c660d39808a6562 100644 (file)
@@ -12477,13 +12477,23 @@ xref_basetypes (code_type_node, name, ref, binfo)
          if (via_virtual || TYPE_USES_VIRTUAL_BASECLASSES (basetype))
            {
              TYPE_USES_VIRTUAL_BASECLASSES (ref) = 1;
-             TYPE_USES_COMPLEX_INHERITANCE (ref) = 1;
+             /* Converting to a virtual base class requires looking
+                up the offset of the virtual base.  */
+             TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (ref) = 1;
            }
 
          if (CLASS_TYPE_P (basetype))
            {
              TYPE_GETS_NEW (ref) |= TYPE_GETS_NEW (basetype);
              TYPE_GETS_DELETE (ref) |= TYPE_GETS_DELETE (basetype);
+             /* If the base-class uses multiple inheritance, so do we.  */
+             TYPE_USES_MULTIPLE_INHERITANCE (ref) 
+               |= TYPE_USES_MULTIPLE_INHERITANCE (basetype);
+             /* Likewise, if converting to a base of the base may require
+                code, then we may need to generate code to convert to a
+                base as well.  */
+             TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (ref) 
+               |= TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (basetype);
            }
 
          i += 1;
@@ -12495,19 +12505,13 @@ xref_basetypes (code_type_node, name, ref, binfo)
     BINFO_BASETYPES (TYPE_BINFO (ref)) = NULL_TREE;
 
   if (i > 1)
-    TYPE_USES_MULTIPLE_INHERITANCE (ref) = 1;
-  else if (i == 1)
     {
-      tree basetype = BINFO_TYPE (TREE_VEC_ELT (binfos, 0));
-      
-      if (CLASS_TYPE_P (basetype))
-       TYPE_USES_MULTIPLE_INHERITANCE (ref)
-         = TYPE_USES_MULTIPLE_INHERITANCE (basetype);
+      TYPE_USES_MULTIPLE_INHERITANCE (ref) = 1;
+      /* If there is more than one non-empty they cannot be at the same
+        address.  */
+      TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (ref) = 1;
     }
 
-  if (TYPE_USES_MULTIPLE_INHERITANCE (ref))
-    TYPE_USES_COMPLEX_INHERITANCE (ref) = 1;
-
   /* Unmark all the types.  */
   while (--i >= 0)
     CLEAR_CLASSTYPE_MARKED (BINFO_TYPE (TREE_VEC_ELT (binfos, i)));
index 7ed8ab0415304911f43095628d7edd43c8bbddcb..58cbf3cf074dc027b6b2c87c767ec60903a162e8 100644 (file)
@@ -2480,7 +2480,7 @@ import_export_class (ctype)
   /* Base our import/export status on that of the first non-inline,
      non-abstract virtual function, if any.  */
   if (import_export == 0
-      && TYPE_VIRTUAL_P (ctype)
+      && TYPE_POLYMORPHIC_P (ctype)
       && ! CLASSTYPE_TEMPLATE_INSTANTIATION (ctype))
     {
       tree method;
@@ -2684,7 +2684,7 @@ import_export_decl (decl)
        import_export_class (ctype);
 
       if (IS_AGGR_TYPE (ctype) && CLASSTYPE_INTERFACE_KNOWN (ctype)
-         && TYPE_VIRTUAL_P (ctype)
+         && TYPE_POLYMORPHIC_P (ctype)
          /* If -fno-rtti, we're not necessarily emitting this stuff with
             the class, so go ahead and emit it now.  This can happen
             when a class is used in exception handling.  */
index 61d127071b7820ee2e5f7a695567b203fa8505c1..e7633f5c58dcf16e7af9cf8c98b67f86f05b6beb 100644 (file)
@@ -1134,7 +1134,7 @@ dump_function_decl (t, flags)
     /* OK */;
   else if (DECL_STATIC_FUNCTION_P (t))
     OB_PUTS ("static ");
-  else if (TYPE_VIRTUAL_P (t))
+  else if (TYPE_POLYMORPHIC_P (t))
     OB_PUTS ("virtual ");
   
   /* Print the return type?  */
index 48d0c7b022d731521176f00648a85378ad84bce8..4d76cfc57c61129ff292ba85847f5048d2acecca 100644 (file)
@@ -4833,8 +4833,8 @@ instantiate_class_template (type)
   TYPE_HAS_CONST_INIT_REF (type) = TYPE_HAS_CONST_INIT_REF (pattern);
   TYPE_HAS_DEFAULT_CONSTRUCTOR (type) = TYPE_HAS_DEFAULT_CONSTRUCTOR (pattern);
   TYPE_HAS_CONVERSION (type) = TYPE_HAS_CONVERSION (pattern);
-  TYPE_USES_COMPLEX_INHERITANCE (type)
-    = TYPE_USES_COMPLEX_INHERITANCE (pattern);
+  TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (type)
+    = TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (pattern);
   TYPE_USES_MULTIPLE_INHERITANCE (type)
     = TYPE_USES_MULTIPLE_INHERITANCE (pattern);
   TYPE_USES_VIRTUAL_BASECLASSES (type)
index fdeefb18f4decdb27c8b514ed514d2c07d5c24d1..92597aa58f5921243bf6f550ae0f47d980cea731 100644 (file)
@@ -170,7 +170,8 @@ repo_inline_used (fn)
     return;
 
   /* Member functions of polymorphic classes go with their vtables.  */
-  if (DECL_FUNCTION_MEMBER_P (fn) && TYPE_VIRTUAL_P (DECL_CLASS_CONTEXT (fn)))
+  if (DECL_FUNCTION_MEMBER_P (fn) 
+      && TYPE_POLYMORPHIC_P (DECL_CLASS_CONTEXT (fn)))
     {
       repo_vtable_used (DECL_CLASS_CONTEXT (fn));
       return;
index 5c8da916fbbbf793777d6f90f678b86bb87a0fc4..74113aba2c65751133caddf8cdfed8e7438e5722 100644 (file)
@@ -84,7 +84,7 @@ build_headof_sub (exp)
 
 /* Given the expression EXP of type `class *', return the head of the
    object pointed to by EXP with type cv void*, if the class has any
-   virtual functions (TYPE_VIRTUAL_P), else just return the
+   virtual functions (TYPE_POLYMORPHIC_P), else just return the
    expression.  */
 
 static tree
@@ -102,7 +102,7 @@ build_headof (exp)
     }
   type = TREE_TYPE (type);
 
-  if (!TYPE_VIRTUAL_P (type))
+  if (!TYPE_POLYMORPHIC_P (type))
     return exp;
   if (CLASSTYPE_COM_INTERFACE (type))
     {
@@ -207,7 +207,7 @@ get_tinfo_fn_dynamic (exp)
     }
 
   /* If exp is a reference to polymorphic type, get the real type_info.  */
-  if (TYPE_VIRTUAL_P (type) && ! resolves_to_fixed_type_p (exp, 0))
+  if (TYPE_POLYMORPHIC_P (type) && ! resolves_to_fixed_type_p (exp, 0))
     {
       /* build reference to type_info from vtable.  */
       tree t;
@@ -274,7 +274,7 @@ build_x_typeid (exp)
 
   if (TREE_CODE (exp) == INDIRECT_REF
       && TREE_CODE (TREE_TYPE (TREE_OPERAND (exp, 0))) == POINTER_TYPE
-      && TYPE_VIRTUAL_P (TREE_TYPE (exp))
+      && TYPE_POLYMORPHIC_P (TREE_TYPE (exp))
       && ! resolves_to_fixed_type_p (exp, &nonnull)
       && ! nonnull)
     {
@@ -327,7 +327,7 @@ get_tinfo_var (type)
     {
       if (CLASSTYPE_N_BASECLASSES (type) == 0)
        size = 2 * POINTER_SIZE;
-      else if (! TYPE_USES_COMPLEX_INHERITANCE (type)
+      else if (! TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (type)
               && (TREE_VIA_PUBLIC
                   (TREE_VEC_ELT (TYPE_BINFO_BASETYPES (type), 0))))
        size = 3 * POINTER_SIZE;
@@ -562,7 +562,7 @@ build_dynamic_cast_1 (type, expr)
   }
 
   /* Otherwise *exprtype must be a polymorphic class (have a vtbl).  */
-  if (TYPE_VIRTUAL_P (TREE_TYPE (exprtype)))
+  if (TYPE_POLYMORPHIC_P (TREE_TYPE (exprtype)))
     {
       tree expr1;
       /* if TYPE is `void *', return pointer to complete object.  */
@@ -1162,7 +1162,7 @@ synthesize_tinfo_fn (fndecl)
     {
       if (CLASSTYPE_N_BASECLASSES (type) == 0)
        expand_generic_desc (tdecl, type, "__rtti_user");
-      else if (! TYPE_USES_COMPLEX_INHERITANCE (type)
+      else if (! TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (type)
               && (TREE_VIA_PUBLIC
                   (TREE_VEC_ELT (TYPE_BINFO_BASETYPES (type), 0))))
        expand_si_desc (tdecl, type);
index ec2594c8a94ab4ffe403ac363d4178c9a791ec57..60f9405547de885603841ac0034b25fef535c9e3 100644 (file)
@@ -657,7 +657,7 @@ lookup_field_1 (type, name)
   if (name == vptr_identifier)
     {
       /* Give the user what s/he thinks s/he wants.  */
-      if (TYPE_VIRTUAL_P (type))
+      if (TYPE_POLYMORPHIC_P (type))
        return TYPE_VFIELD (type);
     }
   return NULL_TREE;
@@ -2373,7 +2373,7 @@ dfs_debug_mark (binfo, data)
 
   /* If the class has virtual functions, we'll emit the debug info
      with the vtable.  */
-  if (TYPE_VIRTUAL_P (t))
+  if (TYPE_POLYMORPHIC_P (t))
     return NULL_TREE;
 
   /* We cannot rely on some alien method to solve our problems,
@@ -2942,7 +2942,7 @@ maybe_suppress_debug_info (t)
     /* Don't set it.  */;
   /* If the class has virtual functions, write out the debug info
      along with the vtable.  */
-  else if (TYPE_VIRTUAL_P (t))
+  else if (TYPE_POLYMORPHIC_P (t))
     TYPE_DECL_SUPPRESS_DEBUG (TYPE_MAIN_DECL (t)) = 1;
 
   /* Otherwise, just emit the debug info normally.  */
index ee12ee66d217412d0d309cc4f5360b3151cf2a4d..9d5bfa781dbf34c994dc1689b9729b4ccdaa1f63 100644 (file)
@@ -2200,7 +2200,7 @@ build_component_ref (datum, component, basetype_path, protect)
        }
 
       /* Handle base classes here...  */
-      if (base != basetype && TYPE_USES_COMPLEX_INHERITANCE (basetype))
+      if (base != basetype && TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (basetype))
        {
          tree addr = build_unary_op (ADDR_EXPR, datum, 0);
          if (integer_zerop (addr))
@@ -4275,7 +4275,7 @@ build_component_addr (arg, argtype)
     }
 
   if (TREE_CODE (field) == FIELD_DECL
-      && TYPE_USES_COMPLEX_INHERITANCE (basetype))
+      && TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (basetype))
     {
       /* Can't convert directly to ARGTYPE, since that
         may have the same pointer type as one of our
index 64671dbae2f1a84a68de5985bd8d78701a581d2f..182b3d7df76002c0f1ecc908c50bcf637f34f739 100644 (file)
@@ -831,7 +831,7 @@ process_init_constructor (type, init, elts)
              return error_mark_node;
            }
 
-         if (TYPE_VIRTUAL_P (type))
+         if (TYPE_POLYMORPHIC_P (type))
            {
              sorry ("initializer list for object using virtual functions");
              return error_mark_node;