mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 12:02:21 +02:00
Fixed FORCELINK sret issue
This commit is contained in:
parent
ae40f99cb4
commit
2c41b5c3f7
1 changed files with 7 additions and 1 deletions
|
@ -4255,7 +4255,7 @@ void BfModule::CreateFakeCallerMethod(const String& funcName)
|
||||||
SizedArray<BfIRValue, 8> args;
|
SizedArray<BfIRValue, 8> args;
|
||||||
BfExprEvaluator exprEvaluator(this);
|
BfExprEvaluator exprEvaluator(this);
|
||||||
|
|
||||||
if (mCurMethodInstance->GetStructRetIdx() != -1)
|
if (mCurMethodInstance->GetStructRetIdx() == 0)
|
||||||
{
|
{
|
||||||
auto retPtrType = CreatePointerType(mCurMethodInstance->mReturnType);
|
auto retPtrType = CreatePointerType(mCurMethodInstance->mReturnType);
|
||||||
exprEvaluator.PushArg(GetDefaultTypedValue(retPtrType, true, BfDefaultValueKind_Const), args);
|
exprEvaluator.PushArg(GetDefaultTypedValue(retPtrType, true, BfDefaultValueKind_Const), args);
|
||||||
|
@ -4267,6 +4267,12 @@ void BfModule::CreateFakeCallerMethod(const String& funcName)
|
||||||
exprEvaluator.PushThis(NULL, thisValue, mCurMethodInstance, args);
|
exprEvaluator.PushThis(NULL, thisValue, mCurMethodInstance, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mCurMethodInstance->GetStructRetIdx() == 1)
|
||||||
|
{
|
||||||
|
auto retPtrType = CreatePointerType(mCurMethodInstance->mReturnType);
|
||||||
|
exprEvaluator.PushArg(GetDefaultTypedValue(retPtrType, true, BfDefaultValueKind_Const), args);
|
||||||
|
}
|
||||||
|
|
||||||
for (int paramIdx = 0; paramIdx < mCurMethodInstance->GetParamCount(); paramIdx++)
|
for (int paramIdx = 0; paramIdx < mCurMethodInstance->GetParamCount(); paramIdx++)
|
||||||
{
|
{
|
||||||
auto paramType = mCurMethodInstance->GetParamType(paramIdx);
|
auto paramType = mCurMethodInstance->GetParamType(paramIdx);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue