/* T needs a different layout as a base (eliding virtual bases
or whatever). Create that version. */
tree base_t = make_node (TREE_CODE (t));
+ tree base_d = create_implicit_typedef (as_base_identifier, base_t);
+
+ TYPE_CONTEXT (base_t) = t;
+ DECL_CONTEXT (base_d) = t;
/* If the ABI version is not at least two, and the last
field was a bit-field, RLI may not be on a byte
if (TREE_CODE (field) == FIELD_DECL)
{
*next_field = copy_node (field);
+ /* Zap any NSDMI, it's not needed and might be a deferred
+ parse. */
+ DECL_INITIAL (*next_field) = NULL_TREE;
DECL_CONTEXT (*next_field) = base_t;
next_field = &DECL_CHAIN (*next_field);
}
needs a mode. */
compute_record_mode (base_t);
- TYPE_CONTEXT (base_t) = t;
-
/* Record the base version of the type. */
CLASSTYPE_AS_BASE (t) = base_t;
}
CPTI_DELTA_IDENTIFIER,
CPTI_IN_CHARGE_IDENTIFIER,
CPTI_VTT_PARM_IDENTIFIER,
+ CPTI_AS_BASE_IDENTIFIER,
CPTI_THIS_IDENTIFIER,
CPTI_PFN_IDENTIFIER,
CPTI_VPTR_IDENTIFIER,
/* The name of the parameter that contains a pointer to the VTT to use
for this subobject constructor or destructor. */
#define vtt_parm_identifier cp_global_trees[CPTI_VTT_PARM_IDENTIFIER]
+#define as_base_identifier cp_global_trees[CPTI_AS_BASE_IDENTIFIER]
#define this_identifier cp_global_trees[CPTI_THIS_IDENTIFIER]
#define pfn_identifier cp_global_trees[CPTI_PFN_IDENTIFIER]
#define vptr_identifier cp_global_trees[CPTI_VPTR_IDENTIFIER]
{"__dt_del ", &deleting_dtor_identifier, cik_dtor},
{"__conv_op ", &conv_op_identifier, cik_conv_op},
{"__in_chrg", &in_charge_identifier, cik_normal},
+ {"__as_base ", &as_base_identifier, cik_normal},
{"this", &this_identifier, cik_normal},
{"__delta", &delta_identifier, cik_normal},
{"__pfn", &pfn_identifier, cik_normal},