1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Use lifetime extension for mixin results

This commit is contained in:
Brian Fiete 2022-06-16 07:21:19 -07:00
parent 1639542fed
commit ccb1646990
12 changed files with 105 additions and 44 deletions

View file

@ -3526,6 +3526,12 @@ void BfModule::VisitCodeBlock(BfBlock* block)
(wasReadOnly ? BfTypedValueKind_ReadOnlyAddr : BfTypedValueKind_Addr));
}
}
if (exprEvaluator->mResult.IsAddr())
{
if (mCurMethodState->mCurScope->ExtendLifetime(exprEvaluator->mResult.mValue))
mBfIRBuilder->CreateLifetimeSoftEnd(exprEvaluator->mResult.mValue);
}
}
break;