1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Fixed const bool debug info emission

This commit is contained in:
Brian Fiete 2021-01-19 11:27:11 -08:00
parent 6d06ee3430
commit 66ab699abf
2 changed files with 7 additions and 2 deletions

View file

@ -335,12 +335,16 @@ int BfIRConstHolder::GetSize(BfTypeCode typeCode)
}
}
bool BfIRConstHolder::IsInt(BfTypeCode typeCode)
{
return (typeCode >= BfTypeCode_Int8) && (typeCode <= BfTypeCode_Char32);
}
bool BfIRConstHolder::IsIntable(BfTypeCode typeCode)
{
return (typeCode >= BfTypeCode_Boolean) && (typeCode <= BfTypeCode_Char32);
}
bool BfIRConstHolder::IsSigned(BfTypeCode typeCode)
{
return (typeCode == BfTypeCode_Int64) ||
@ -2876,7 +2880,7 @@ void BfIRBuilder::CreateDbgTypeDefinition(BfType* type)
int flags = 0;
String fieldName = fieldDef->mName;
if ((constant != NULL) &&
((IsInt(constant->mTypeCode)) || (IsFloat(constant->mTypeCode))))
((IsIntable(constant->mTypeCode)) || (IsFloat(constant->mTypeCode))))
{
int64 writeVal = constant->mInt64;
if (constant->mTypeCode == BfTypeCode_Float)