From 89573a731a435719fab52eca3ab6df753b50eccc Mon Sep 17 00:00:00 2001 From: Alexey Prokhin Date: Sun, 8 Dec 2013 14:43:27 +0400 Subject: [PATCH] Fix DMD Issue 10451 - Array of pointers to opaque struct gives forward reference errors. --- gen/typinf.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gen/typinf.cpp b/gen/typinf.cpp index 1148c5df..3695c789 100644 --- a/gen/typinf.cpp +++ b/gen/typinf.cpp @@ -601,6 +601,13 @@ void TypeInfoStructDeclaration::llvmDefine() TypeStruct *tc = static_cast(tinfo); StructDeclaration *sd = tc->sym; + // handle opaque structs + if (!sd->members) { + RTTIBuilder b(Type::typeinfostruct); + b.finalize(ir.irGlobal); + return; + } + // can't emit typeinfo for forward declarations if (sd->sizeok != SIZEOKdone) {