diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2021-12-20 19:25:32 +0100 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2021-12-20 19:29:43 +0100 |
commit | b3f58f87d78b958e35e4a44f5fdb4b7721cb2837 (patch) | |
tree | cb6530272537c7d845faab6a1ce0042f3096f618 /gcc/d/expr.cc | |
parent | 7d5d5032c7200714388db63c7a5676b6ab3e040e (diff) | |
download | gcc-b3f58f87d78b958e35e4a44f5fdb4b7721cb2837.zip gcc-b3f58f87d78b958e35e4a44f5fdb4b7721cb2837.tar.gz gcc-b3f58f87d78b958e35e4a44f5fdb4b7721cb2837.tar.bz2 |
d: Merge upstream dmd ad8412530, druntime fd9a4544, phobos 495e835c2.
D front-end changes:
- Import dmd v2.098.1
- Remove calling of _d_delstruct from code generator.
Druntime changes:
- Import druntime v2.098.1
Phobos changes:
- Import phobos v2.098.1
gcc/d/ChangeLog:
* dmd/MERGE: Merge upstream dmd ad8412530.
* expr.cc (ExprVisitor::visit (DeleteExp *)): Remove code generation
of _d_delstruct.
* runtime.def (DELSTRUCT): Remove.
libphobos/ChangeLog:
* libdruntime/MERGE: Merge upstream druntime fd9a4544.
* src/MERGE: Merge upstream phobos 495e835c2.
Diffstat (limited to 'gcc/d/expr.cc')
-rw-r--r-- | gcc/d/expr.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/gcc/d/expr.cc b/gcc/d/expr.cc index f1c014d..665d122 100644 --- a/gcc/d/expr.cc +++ b/gcc/d/expr.cc @@ -1477,16 +1477,10 @@ public: t1 = build_address (t1); Type *tnext = tb1->isTypePointer ()->next->toBasetype (); + /* This case should have been rewritten to `_d_delstruct` in the + semantic phase. */ if (TypeStruct *ts = tnext->isTypeStruct ()) - { - if (ts->sym->dtor) - { - tree ti = build_typeinfo (e->loc, tnext); - this->result_ = build_libcall (LIBCALL_DELSTRUCT, Type::tvoid, - 2, t1, ti); - return; - } - } + gcc_assert (!ts->sym->dtor); /* Otherwise, the garbage collector is called to immediately free the memory allocated for the pointer. */ |