1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Fixed sized array size inference, primitive type handling in ir

This commit is contained in:
Brian Fiete 2020-12-24 06:58:38 -08:00
parent 8894430f98
commit a20519ee04
8 changed files with 92 additions and 21 deletions

View file

@ -744,6 +744,14 @@ void BfIRCodeGen::Read(llvm::Type*& llvmType)
}
int typeId = (int)ReadSLEB128();
if (typeKind == BfIRType::TypeKind::TypeKind_TypeCode)
{
bool isSigned = false;
llvmType = GetLLVMType((BfTypeCode)typeId, isSigned);
return;
}
auto& typeEntry = GetTypeEntry(typeId);
if (typeKind == BfIRType::TypeKind::TypeKind_TypeId)
llvmType = typeEntry.mLLVMType;