mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Fixed const bool debug info emission
This commit is contained in:
parent
6d06ee3430
commit
66ab699abf
2 changed files with 7 additions and 2 deletions
|
@ -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)
|
||||
|
|
|
@ -901,6 +901,7 @@ public:
|
|||
void FixTypeCode(BfTypeCode& typeCode);
|
||||
int GetSize(BfTypeCode typeCode);
|
||||
static bool IsInt(BfTypeCode typeCode);
|
||||
static bool IsIntable(BfTypeCode typeCode);
|
||||
static bool IsSigned(BfTypeCode typeCode);
|
||||
static bool IsFloat(BfTypeCode typeCode);
|
||||
const char* AllocStr(const StringImpl& str);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue