Fixed #34 - StructType::setBody assert isOpaque() failed

This commit is contained in:
Alexey Prokhin
2011-12-05 12:45:17 +04:00
parent f5182abca3
commit 4b22221eb9

View File

@@ -2865,7 +2865,7 @@ LLConstant* StructLiteralExp::toConstElem(IRState* p)
// return constant struct
if (!constType)
constType = LLStructType::get(gIR->context(), types);
else
else if (constType->isOpaque())
constType->setBody(types);
return LLConstantStruct::get(constType, llvm::makeArrayRef(constvals));
}