mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Improved const handling of char8*
This commit is contained in:
parent
b075f8dbf3
commit
7f3b3f2e09
4 changed files with 98 additions and 4 deletions
|
@ -322,6 +322,10 @@ String BfIRConstHolder::ToString(BfIRValue irValue)
|
|||
{
|
||||
return StrFormat("Constant %lld", constant->mInt64);
|
||||
}
|
||||
else if (constant->mTypeCode == BfTypeCode_CharPtr)
|
||||
{
|
||||
return StrFormat("CharPtr %d", constant->mInt64);
|
||||
}
|
||||
else if (constant->mTypeCode == BfTypeCode_StringId)
|
||||
{
|
||||
return StrFormat("StringId %d", constant->mInt64);
|
||||
|
@ -942,7 +946,7 @@ BfIRValue BfIRConstHolder::CreateConst(BfConstant* fromConst, BfIRConstHolder* f
|
|||
{
|
||||
return CreateConst(fromConst->mTypeCode, 0);
|
||||
}
|
||||
else if ((IsInt(fromConst->mTypeCode)) || (fromConst->mTypeCode == BfTypeCode_Boolean) || (fromConst->mTypeCode == BfTypeCode_StringId))
|
||||
else if ((IsInt(fromConst->mTypeCode)) || (fromConst->mTypeCode == BfTypeCode_Boolean) || (fromConst->mTypeCode == BfTypeCode_StringId) || (fromConst->mTypeCode == BfTypeCode_CharPtr))
|
||||
{
|
||||
return CreateConst(fromConst->mTypeCode, fromConst->mUInt64);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue