mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
More support for bitcasts with consts
This commit is contained in:
parent
0ee161c314
commit
def7990dbe
4 changed files with 47 additions and 24 deletions
|
@ -11811,7 +11811,7 @@ BfIRValue BfModule::CastToValue(BfAstNode* srcNode, BfTypedValue typedVal, BfTyp
|
|||
|
||||
if (allowCast)
|
||||
{
|
||||
if (ignoreWrites)
|
||||
if ((ignoreWrites) && (!typedVal.mValue.IsConst()))
|
||||
return mBfIRBuilder->GetFakeVal();
|
||||
return mBfIRBuilder->CreateBitCast(typedVal.mValue, mBfIRBuilder->MapType(toType));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue