Skip to content

Commit 939270c

Browse files
committed
[NFC] More prep work for sharing code between param and result reabstraction
1 parent c2207c6 commit 939270c

File tree

3 files changed

+94
-80
lines changed

3 files changed

+94
-80
lines changed

lib/SILGen/SILGenBackDeploy.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,14 @@ void SILGenFunction::emitBackDeploymentThunk(SILDeclRef thunk) {
190190

191191
// Generate the thunk prolog by collecting parameters.
192192
SmallVector<ManagedValue, 4> params;
193-
SmallVector<SILArgument *, 4> indirectParams;
193+
SmallVector<ManagedValue, 4> indirectParams;
194194
collectThunkParams(loc, params, &indirectParams);
195195

196196
// Build up the list of arguments that we're going to invoke the the real
197197
// function with.
198198
SmallVector<SILValue, 8> paramsForForwarding;
199199
for (auto indirectParam : indirectParams) {
200-
paramsForForwarding.emplace_back(indirectParam);
200+
paramsForForwarding.emplace_back(indirectParam.getLValueAddress());
201201
}
202202

203203
for (auto param : params) {

lib/SILGen/SILGenFunction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2252,7 +2252,7 @@ class LLVM_LIBRARY_VISIBILITY SILGenFunction
22522252
/// Used for emitting SILArguments of bare functions, such as thunks.
22532253
void collectThunkParams(
22542254
SILLocation loc, SmallVectorImpl<ManagedValue> &params,
2255-
SmallVectorImpl<SILArgument *> *indirectResultParams = nullptr);
2255+
SmallVectorImpl<ManagedValue> *indirectResultParams = nullptr);
22562256

22572257
/// Build the type of a function transformation thunk.
22582258
CanSILFunctionType buildThunkType(CanSILFunctionType &sourceType,

0 commit comments

Comments
 (0)