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

Fixed invalid CheckConstEquality global variable const evaluation

This commit is contained in:
Brian Fiete 2021-06-29 09:49:30 -07:00
parent f49c1957a0
commit 4ef6723ac2

View file

@ -489,11 +489,12 @@ int BfIRConstHolder::CheckConstEquality(BfIRValue lhs, BfIRValue rhs)
return 1;
}
if (constLHS->mConstType == BfConstType_GlobalVar)
{
// We would have already caught the (constLHS == constRHS) case further up
return 0;
}
//TODO: Why did we do this? This made global variable comparisons (ie: sA != sB) const-evaluate to false always
// if (constLHS->mConstType == BfConstType_GlobalVar)
// {
// // We would have already caught the (constLHS == constRHS) case further up
// return 0;
// }
return -1;
}