]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Reserve Is_Constructor for Ada constructors
authorDenis Mazzucato <mazzucato@adacore.com>
Thu, 30 Oct 2025 11:54:55 +0000 (12:54 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 18 Nov 2025 15:05:10 +0000 (16:05 +0100)
gcc/ada/ChangeLog:

* gcc-interface/decl.cc
(is_cplusplus_method,gnat_to_gnu_param,gnat_to_gnu_subprog_type):
Adjust Is_Constructor/Is_CPP_Constructor after renaming.

gcc/ada/gcc-interface/decl.cc

index 7ebd432119530441ebc64df3145f8dea55e33c08..fdbbb7ce0a86382516cc87b8d63fd7ed4f4f0fcd 100644 (file)
@@ -5206,7 +5206,7 @@ is_cplusplus_method (Entity_Id gnat_entity)
      it is declared without the 'this' parameter in the sources and, although
      the front-end will create a version with the 'this' parameter for code
      generation purposes, we want to return true for both versions.  */
-  if (Is_Constructor (gnat_entity))
+  if (Is_CPP_Constructor (gnat_entity))
     return true;
 
   /* Check that the subprogram has C++ convention.  */
@@ -5836,7 +5836,7 @@ gnat_to_gnu_param (Entity_Id gnat_param, tree gnu_param_type, bool first,
       = make_type_from_size (gnu_param_type, size_int (POINTER_SIZE), 0);
 
   /* Use a pointer type for the "this" pointer of C++ constructors.  */
-  else if (Chars (gnat_param) == Name_uInit && Is_Constructor (gnat_subprog))
+  else if (Chars (gnat_param) == Name_uInit && Is_CPP_Constructor (gnat_subprog))
     {
       gcc_assert (mech == By_Reference);
       gnu_param_type = build_pointer_type (gnu_param_type);
@@ -6611,7 +6611,7 @@ gnat_to_gnu_subprog_type (Entity_Id gnat_subprog, bool definition,
   /* Turn imported C++ constructors into their callable form as done in the
      front-end, i.e. add the "this" pointer and void the return type.  */
   if (method_p
-      && Is_Constructor (gnat_subprog)
+      && Is_CPP_Constructor (gnat_subprog)
       && !VOID_TYPE_P (gnu_return_type))
     {
       tree gnu_param_type