From 4774745f44cac66af99fd841f10c16b69cb79244 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Sun, 16 Jun 2013 20:23:07 +0200 Subject: [PATCH] Do not try to generate metadata for unresolved types. This does not fix the root cause, which is likely a frontend bug/oddity, but avoids the crash. --- gen/typinf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/typinf.cpp b/gen/typinf.cpp index 0d07ab7f..cbbb0ed8 100644 --- a/gen/typinf.cpp +++ b/gen/typinf.cpp @@ -320,7 +320,7 @@ void DtoResolveTypeInfo(TypeInfoDeclaration* tid) // As those types cannot appear as LLVM values, they are not interesting for // the optimizer passes anyway. Type* t = tid->tinfo->toBasetype(); - if (t->ty < Terror && t->ty != Tvoid && t->ty != Tfunction) { + if (t->ty < Terror && t->ty != Tvoid && t->ty != Tfunction && t->ty != Tident) { // Add some metadata for use by optimization passes. std::string metaname = std::string(TD_PREFIX) + mangle; llvm::NamedMDNode* meta = gIR->module->getNamedMetadata(metaname);