mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 12:02:21 +02:00
Fix for valueluess mixin arguments
This commit is contained in:
parent
678bdc0ba6
commit
f723ce1e39
1 changed files with 16 additions and 14 deletions
|
@ -17705,22 +17705,24 @@ void BfExprEvaluator::InjectMixin(BfAstNode* targetSrc, BfTypedValue target, boo
|
||||||
|
|
||||||
BfType* allocType = localVal.mType;
|
BfType* allocType = localVal.mType;
|
||||||
|
|
||||||
auto allocaVal = mModule->CreateAlloca(allocType);
|
if (!allocType->IsValuelessType())
|
||||||
|
|
||||||
mModule->mBfIRBuilder->CreateStore(localVal.mValue, allocaVal);
|
|
||||||
|
|
||||||
if (!mModule->mBfIRBuilder->mIgnoreWrites)
|
|
||||||
{
|
{
|
||||||
if (newLocalVar->mIsSplat)
|
auto allocaVal = mModule->CreateAlloca(allocType);
|
||||||
|
mModule->mBfIRBuilder->CreateStore(localVal.mValue, allocaVal);
|
||||||
|
|
||||||
|
if (!mModule->mBfIRBuilder->mIgnoreWrites)
|
||||||
{
|
{
|
||||||
//TODO: Implement
|
if (newLocalVar->mIsSplat)
|
||||||
}
|
{
|
||||||
else
|
//TODO: Implement
|
||||||
{
|
}
|
||||||
auto diType = mModule->mBfIRBuilder->DbgGetType(allocType);
|
else
|
||||||
auto diVariable = mModule->mBfIRBuilder->DbgCreateAutoVariable(mModule->mCurMethodState->mCurScope->mDIScope,
|
{
|
||||||
newLocalVar->mName, mModule->mCurFilePosition.mFileInstance->mDIFile, mModule->mCurFilePosition.mCurLine, diType);
|
auto diType = mModule->mBfIRBuilder->DbgGetType(allocType);
|
||||||
mModule->mBfIRBuilder->DbgInsertDeclare(allocaVal, diVariable);
|
auto diVariable = mModule->mBfIRBuilder->DbgCreateAutoVariable(mModule->mCurMethodState->mCurScope->mDIScope,
|
||||||
|
newLocalVar->mName, mModule->mCurFilePosition.mFileInstance->mDIFile, mModule->mCurFilePosition.mCurLine, diType);
|
||||||
|
mModule->mBfIRBuilder->DbgInsertDeclare(allocaVal, diVariable);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue