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:
parent
f49c1957a0
commit
4ef6723ac2
1 changed files with 6 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue