+2019-04-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ * c-ada-spec.c (print_destructor): Deal with deleting destructors.
+ (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
+
2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (is_float128): New predicate extracted from...
tree decl_name = DECL_NAME (TYPE_NAME (type));
pp_string (buffer, "Delete_");
+ if (strncmp (IDENTIFIER_POINTER (DECL_NAME (t)), "__dt_del", 8) == 0)
+ pp_string (buffer, "And_Free_");
pp_ada_tree_identifier (buffer, decl_name, t, false);
}
if (DECL_ARTIFICIAL (t))
return 0;
- /* Only consider constructors/destructors for complete objects. */
+ /* Only consider complete constructors and deleting destructors. */
if (strncmp (IDENTIFIER_POINTER (decl_name), "__ct_comp", 9) != 0
- && strncmp (IDENTIFIER_POINTER (decl_name), "__dt_comp", 9) != 0)
+ && strncmp (IDENTIFIER_POINTER (decl_name), "__dt_comp", 9) != 0
+ && strncmp (IDENTIFIER_POINTER (decl_name), "__dt_del", 8) != 0)
return 0;
}