1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Fixes to "valueless" crepr structs

This commit is contained in:
Brian Fiete 2025-03-28 09:33:06 -04:00
parent eb41a9c1de
commit 5c11c2271e
4 changed files with 29 additions and 5 deletions

View file

@ -2880,6 +2880,20 @@ bool BfTypeInstance::IsValuelessCReprType()
return true;
}
BfTypeInstance* BfTypeInstance::GetBaseType(bool remapValuelessCRepr)
{
if (!remapValuelessCRepr)
return mBaseType;
auto checkType = mBaseType;
while (checkType != NULL)
{
if (!checkType->IsValuelessCReprType())
break;
checkType = checkType->mBaseType;
}
return checkType;
}
bool BfTypeInstance::IsIRFuncUsed(BfIRFunction func)
{
for (auto& group : mMethodInstanceGroups)