mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-26 08:33:14 +01:00
Fixed #34 - StructType::setBody assert isOpaque() failed
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user