mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Improved "const" handling of local variable when referencing globals
This commit is contained in:
parent
989e8455e8
commit
e7a966c1b5
3 changed files with 7 additions and 27 deletions
|
@ -666,6 +666,10 @@ bool BfIRConstHolder::IsConstValue(BfIRValue value)
|
|||
return false;
|
||||
if (constant->mConstType == BfConstType_Undef)
|
||||
return false;
|
||||
if (constant->mConstType == BfConstType_GEP32_2)
|
||||
return IsConstValue(BfIRValue(BfIRValueFlags_Const, ((BfConstantGEP32_2*)constant)->mTarget));
|
||||
if (constant->mConstType == BfConstType_BitCast)
|
||||
return IsConstValue(BfIRValue(BfIRValueFlags_Const, ((BfConstantBitCast*)constant)->mTarget));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue