pp_ada_tree_identifier (buffer, decl_name, t, false);
}
+/* Dump in BUFFER assignment operator spec corresponding to T. */
+
+static void
+print_assignment_operator (pretty_printer *buffer, tree t, tree type)
+{
+ tree decl_name = DECL_NAME (TYPE_NAME (type));
+
+ pp_string (buffer, "Assign_");
+ pp_ada_tree_identifier (buffer, decl_name, t, false);
+}
+
/* Return the name of type T. */
static const char *
bool is_method = TREE_CODE (TREE_TYPE (t)) == METHOD_TYPE;
tree decl_name = DECL_NAME (t);
bool is_abstract = false;
+ bool is_assignment_operator = false;
bool is_constructor = false;
bool is_destructor = false;
bool is_copy_constructor = false;
if (cpp_check)
{
is_abstract = cpp_check (t, IS_ABSTRACT);
+ is_assignment_operator = cpp_check (t, IS_ASSIGNMENT_OPERATOR);
is_constructor = cpp_check (t, IS_CONSTRUCTOR);
is_destructor = cpp_check (t, IS_DESTRUCTOR);
is_copy_constructor = cpp_check (t, IS_COPY_CONSTRUCTOR);
return 0;
}
+ else if (is_assignment_operator)
+ {
+ /* ??? Skip implicit or non-method assignment operators for now. */
+ if (DECL_ARTIFICIAL (t) || !is_method)
+ return 0;
+ }
+
/* If this function has an entry in the vtable, we cannot omit it. */
else if (!DECL_VINDEX (t) && *IDENTIFIER_POINTER (decl_name) == '_')
{
print_constructor (buffer, t, type);
else if (is_destructor)
print_destructor (buffer, t, type);
+ else if (is_assignment_operator)
+ print_assignment_operator (buffer, t, type);
else
dump_ada_decl_name (buffer, t, false);