diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2021-07-26 17:31:40 +0200 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2021-07-30 12:51:35 +0200 |
commit | bc5208f7357bfe8e466890a4c856a642cc16920f (patch) | |
tree | cbc6f17418d942a80ef54a35acb212c4c9e6b263 /gcc/d/types.cc | |
parent | b2abe4e1aded1409964b870899d18dfdb6384821 (diff) | |
download | gcc-bc5208f7357bfe8e466890a4c856a642cc16920f.zip gcc-bc5208f7357bfe8e466890a4c856a642cc16920f.tar.gz gcc-bc5208f7357bfe8e466890a4c856a642cc16920f.tar.bz2 |
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.
Diffstat (limited to 'gcc/d/types.cc')
-rw-r--r-- | gcc/d/types.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/d/types.cc b/gcc/d/types.cc index ba2d6d4..8e67461 100644 --- a/gcc/d/types.cc +++ b/gcc/d/types.cc @@ -469,7 +469,7 @@ layout_aggregate_type (AggregateDeclaration *decl, tree type, insert_aggregate_field (type, field, 0); } - if (!id && !cd->isCPPclass ()) + if (!id && cd->hasMonitor ()) { tree field = create_field_decl (ptr_type_node, "__monitor", 1, inherited_p); |