From 7a08e7bf111cf5f23c2097964660bc4c308cb9d1 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Wed, 11 Mar 2020 13:59:35 -0700 Subject: [PATCH] Fixed FORCELINK with srets --- IDEHelper/Compiler/BfModule.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/IDEHelper/Compiler/BfModule.cpp b/IDEHelper/Compiler/BfModule.cpp index 8b36dbc9..81dc19a7 100644 --- a/IDEHelper/Compiler/BfModule.cpp +++ b/IDEHelper/Compiler/BfModule.cpp @@ -3758,6 +3758,12 @@ void BfModule::CreateFakeCallerMethod(const String& funcName) SizedArray 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);