d: Use hasMonitor to determine whether to emit a __monitor field in D classes
authorIain Buclaw <ibuclaw@gdcproject.org>
Mon, 26 Jul 2021 15:31:40 +0000 (17:31 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Fri, 30 Jul 2021 10:51:35 +0000 (12:51 +0200)
commitbc5208f7357bfe8e466890a4c856a642cc16920f
treecbc6f17418d942a80ef54a35acb212c4c9e6b263
parentb2abe4e1aded1409964b870899d18dfdb6384821
d: Use hasMonitor to determine whether to emit a __monitor field in D classes

This helper introduced by the front-end is a better gate, and allows the
front-end to change rules for what gets a monitor in the future.

gcc/d/ChangeLog:

* types.cc (layout_aggregate_type): Call hasMonitor.
* typeinfo.cc (TypeInfoVisitor::layout_base): Likewise.
(layout_cpp_typeinfo): Likewise.  Don't emit vtable unless
have_typeinfo_p.
gcc/d/typeinfo.cc
gcc/d/types.cc