This change fixes the symbol merging in get_symbol_decl to also consider prototypes. This allows the ability to set user defined attributes on the prototype of a function, which then get applied to the definition, if found later in the compilation. The lowering of UDAs to GCC attributes has been commonized into a single function called apply_user_attributes. gcc/d/ChangeLog: PR d/90136 * d-attribs.cc: Include dmd/attrib.h. (build_attributes): Redeclare as static. (apply_user_attributes): New function. * d-tree.h (class UserAttributeDeclaration): Remove. (build_attributes): Remove. (apply_user_attributes): Declare. (finish_aggregate_type): Remove attrs argument. * decl.cc (get_symbol_decl): Merge declaration prototypes with definitions. Use apply_user_attributes. * modules.cc (layout_moduleinfo_fields): Remove last argument to finish_aggregate_type. * typeinfo.cc (layout_classinfo_interfaces): Likewise. * types.cc (layout_aggregate_members): Likewise. (finish_aggregate_type): Remove attrs argument. (TypeVisitor::visit (TypeEnum *)): Use apply_user_attributes. (TypeVisitor::visit (TypeStruct *)): Remove last argument to finish_aggregate_type. Use apply_user_attributes. (TypeVisitor::visit (TypeClass *)): Likewise. gcc/testsuite/ChangeLog: PR d/90136 * gdc.dg/pr90136a.d: New test. * gdc.dg/pr90136b.d: New test. * gdc.dg/pr90136c.d: New test.
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| dmd | Loading commit data... | |
| ChangeLog | Loading commit data... | |
| ChangeLog-2006 | Loading commit data... | |
| ChangeLog-2007 | Loading commit data... | |
| ChangeLog-2008 | Loading commit data... | |
| ChangeLog-2009 | Loading commit data... | |
| ChangeLog-2010 | Loading commit data... | |
| ChangeLog-2011 | Loading commit data... | |
| ChangeLog-2012 | Loading commit data... | |
| ChangeLog-2013 | Loading commit data... | |
| ChangeLog-2014 | Loading commit data... | |
| ChangeLog-2015 | Loading commit data... | |
| ChangeLog-2016 | Loading commit data... | |
| ChangeLog-2017 | Loading commit data... | |
| ChangeLog-2018 | Loading commit data... | |
| ChangeLog-2019 | Loading commit data... | |
| Make-lang.in | Loading commit data... | |
| README.gcc | Loading commit data... | |
| config-lang.in | Loading commit data... | |
| d-attribs.cc | Loading commit data... | |
| d-builtins.cc | Loading commit data... | |
| d-codegen.cc | Loading commit data... | |
| d-convert.cc | Loading commit data... | |
| d-diagnostic.cc | Loading commit data... | |
| d-frontend.cc | Loading commit data... | |
| d-incpath.cc | Loading commit data... | |
| d-lang.cc | Loading commit data... | |
| d-longdouble.cc | Loading commit data... | |
| d-spec.cc | Loading commit data... | |
| d-system.h | Loading commit data... | |
| d-target-def.h | Loading commit data... | |
| d-target.cc | Loading commit data... | |
| d-target.def | Loading commit data... | |
| d-target.h | Loading commit data... | |
| d-tree.def | Loading commit data... | |
| d-tree.h | Loading commit data... | |
| decl.cc | Loading commit data... | |
| expr.cc | Loading commit data... | |
| gdc.texi | Loading commit data... | |
| imports.cc | Loading commit data... | |
| intrinsics.cc | Loading commit data... | |
| intrinsics.def | Loading commit data... | |
| lang-specs.h | Loading commit data... | |
| lang.opt | Loading commit data... | |
| longdouble.h | Loading commit data... | |
| modules.cc | Loading commit data... | |
| runtime.cc | Loading commit data... | |
| runtime.def | Loading commit data... | |
| toir.cc | Loading commit data... | |
| typeinfo.cc | Loading commit data... | |
| types.cc | Loading commit data... | |
| verstr.h | Loading commit data... |