mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Fixed handling of splattable 'params' types like 'Span<T>'
This commit is contained in:
parent
69028249d7
commit
84d4084f83
1 changed files with 3 additions and 3 deletions
|
@ -7415,8 +7415,8 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, const BfTypedValu
|
||||||
expandedParamAlloca = mModule->CreateAlloca(genericTypeInst->mGenericTypeInfo->mTypeGenericArguments[0], true, NULL, mModule->GetConstValue(numElements));
|
expandedParamAlloca = mModule->CreateAlloca(genericTypeInst->mGenericTypeInfo->mTypeGenericArguments[0], true, NULL, mModule->GetConstValue(numElements));
|
||||||
mModule->mBfIRBuilder->CreateStore(expandedParamAlloca, mModule->mBfIRBuilder->CreateInBoundsGEP(expandedParamsArray.mValue, 0, 1));
|
mModule->mBfIRBuilder->CreateStore(expandedParamAlloca, mModule->mBfIRBuilder->CreateInBoundsGEP(expandedParamsArray.mValue, 0, 1));
|
||||||
mModule->mBfIRBuilder->CreateStore(mModule->GetConstValue(numElements), mModule->mBfIRBuilder->CreateInBoundsGEP(expandedParamsArray.mValue, 0, 2));
|
mModule->mBfIRBuilder->CreateStore(mModule->GetConstValue(numElements), mModule->mBfIRBuilder->CreateInBoundsGEP(expandedParamsArray.mValue, 0, 2));
|
||||||
|
|
||||||
PushArg(expandedParamsArray, irArgs);
|
PushArg(expandedParamsArray, irArgs, !wantsSplat);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (wantType->IsSizedArray())
|
else if (wantType->IsSizedArray())
|
||||||
|
@ -7434,7 +7434,7 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, const BfTypedValu
|
||||||
|
|
||||||
expandedParamsArray = BfTypedValue(mModule->CreateAlloca(wantType), wantType, true);
|
expandedParamsArray = BfTypedValue(mModule->CreateAlloca(wantType), wantType, true);
|
||||||
expandedParamAlloca = mModule->mBfIRBuilder->CreateBitCast(expandedParamsArray.mValue, mModule->mBfIRBuilder->GetPointerTo(mModule->mBfIRBuilder->MapType(expandedParamsElementType)));
|
expandedParamAlloca = mModule->mBfIRBuilder->CreateBitCast(expandedParamsArray.mValue, mModule->mBfIRBuilder->GetPointerTo(mModule->mBfIRBuilder->MapType(expandedParamsElementType)));
|
||||||
PushArg(expandedParamsArray, irArgs);
|
PushArg(expandedParamsArray, irArgs, !wantsSplat);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue