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.
This commit is contained in:
David Nadlinger 2013-06-16 20:23:07 +02:00
parent a0ffaf56bf
commit 4774745f44

View file

@ -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);