1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Fixed sized-aligned aggzero

This commit is contained in:
Brian Fiete 2021-01-31 06:50:58 -08:00
parent 8c700e6deb
commit 96e00fc7d8

View file

@ -913,8 +913,13 @@ void BfIRCodeGen::Read(llvm::Value*& llvmValue, BfIRCodeGenEntry** codeGenEntry,
}
else if (constType == BfConstType_AggZero)
{
CMD_PARAM(llvm::Type*, type);
llvmValue = llvm::ConstantAggregateZero::get(type);
BfIRTypeEntry* typeEntry = NULL;
llvm::Type* type = NULL;
Read(type, &typeEntry);
if ((wantSizeAligned) && (typeEntry != NULL))
llvmValue = llvm::ConstantAggregateZero::get(GetSizeAlignedType(typeEntry));
else
llvmValue = llvm::ConstantAggregateZero::get(type);
return;
}
else if (constType == BfConstType_ArrayZero8)