mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Fixed field dtors with valueless fields
This commit is contained in:
parent
ce96772054
commit
0bbb8398d2
1 changed files with 5 additions and 1 deletions
|
@ -15743,7 +15743,11 @@ void BfModule::EmitDtorBody()
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!mCurTypeInstance->IsValueType())
|
||||
if (fieldInst->mResolvedType->IsValuelessType())
|
||||
{
|
||||
value = mBfIRBuilder->GetFakeVal();
|
||||
}
|
||||
else if (!mCurTypeInstance->IsValueType())
|
||||
{
|
||||
auto thisValue = GetThis();
|
||||
value = mBfIRBuilder->CreateInBoundsGEP(thisValue.mValue, 0, fieldInst->mDataIdx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue