1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Fixed FORCELINK with srets

This commit is contained in:
Brian Fiete 2020-03-11 13:59:35 -07:00
parent 0a407b0913
commit 7a08e7bf11

View file

@ -3758,6 +3758,12 @@ void BfModule::CreateFakeCallerMethod(const String& funcName)
SizedArray<BfIRValue, 8> args;
BfExprEvaluator exprEvaluator(this);
if (mCurMethodInstance->HasStructRet())
{
auto retPtrType = CreatePointerType(mCurMethodInstance->mReturnType);
exprEvaluator.PushArg(GetDefaultTypedValue(retPtrType, true, BfDefaultValueKind_Const), args);
}
if (mCurMethodInstance->HasThis())
{
auto thisValue = GetDefaultTypedValue(mCurMethodInstance->GetOwner(), true);