]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
d: Field names of anonymous delegates should be same as regular delegate types.
authorIain Buclaw <ibuclaw@gdcproject.org>
Mon, 15 Aug 2022 07:54:15 +0000 (09:54 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Mon, 15 Aug 2022 19:35:09 +0000 (21:35 +0200)
Doesn't change anything in the code generation or ABI, but makes it
consistent with regular delegates as names would match up when
inspecting tree dumps.

gcc/d/ChangeLog:

* d-codegen.cc (build_delegate_cst): Give anonymous delegate field
names same as per ABI spec.

gcc/d/d-codegen.cc

index 3fd4bee58f6910aaefdff159e9e2a5742e10798b..d02da1f81e356a6f2bedcf72b1be1f7ea7058aec 100644 (file)
@@ -419,8 +419,8 @@ build_delegate_cst (tree method, tree object, Type *type)
     {
       /* Convert a function method into an anonymous delegate.  */
       ctype = make_struct_type ("delegate()", 2,
-                               get_identifier ("object"), TREE_TYPE (object),
-                               get_identifier ("func"), TREE_TYPE (method));
+                               get_identifier ("ptr"), TREE_TYPE (object),
+                               get_identifier ("funcptr"), TREE_TYPE (method));
       TYPE_DELEGATE (ctype) = 1;
     }