mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Fixed union lookup
This commit is contained in:
parent
519ccfe969
commit
d2356a0582
1 changed files with 1 additions and 5 deletions
|
@ -5320,11 +5320,7 @@ BfTypedValue BfExprEvaluator::LoadField(BfAstNode* targetSrc, BfTypedValue targe
|
|||
}
|
||||
|
||||
if ((target.mType->IsUnion()) && (!target.mType->IsValuelessType()))
|
||||
{
|
||||
auto ptrTarget = mModule->MakeAddressable(target);
|
||||
BfIRType llvmPtrType = mModule->mBfIRBuilder->GetPointerTo(mModule->mBfIRBuilder->MapType(resolvedFieldType));
|
||||
return BfTypedValue(mModule->mBfIRBuilder->CreateBitCast(ptrTarget.mValue, llvmPtrType), resolvedFieldType, true);
|
||||
}
|
||||
target = mModule->MakeAddressable(target);
|
||||
|
||||
BfTypedValue retVal;
|
||||
if (target.IsSplat())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue