diff mbox series

[committed,11/12] d: Always layout initializer for the m_RTInfo field in TypeInfo_Class

Message ID 20210730110111.569140-11-ibuclaw@gdcproject.org
State New
Headers show
Series d: Series of refactorings to the D front-end | expand

Commit Message

Iain Buclaw July 30, 2021, 11:01 a.m. UTC
Makes it explicit that the default value is set to NULL.

gcc/d/ChangeLog:

	* typeinfo.cc (TypeInfoVisitor::visit (TypeInfoClassDeclaration *)):
	Always layout initializer for the m_RTInfo field.
---
 gcc/d/typeinfo.cc | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/gcc/d/typeinfo.cc b/gcc/d/typeinfo.cc
index c9126f4c6b5..978c73e65f6 100644
--- a/gcc/d/typeinfo.cc
+++ b/gcc/d/typeinfo.cc
@@ -934,6 +934,8 @@  public:
 	  this->layout_field (build_expr (cd->getRTInfo, true));
 	else if (!(flags & ClassFlags::noPointers))
 	  this->layout_field (size_one_node);
+	else
+	  this->layout_field (null_pointer_node);
       }
     else
       {