Skip to content

Commit e9ca509

Browse files
xedinktoso
authored andcommitted
[Distributed] Synthesis: Don't re-use AST nodes for decodeArgument references
1 parent 0f66acd commit e9ca509

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/Sema/CodeSynthesisDistributedActor.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,11 @@ deriveBodyDistributed_thunk(AbstractFunctionDecl *thunk, void *context) {
279279
auto recordArgumentDecl =
280280
C.getRecordArgumentOnDistributedInvocationEncoder(invocationEncoderDecl);
281281
assert(recordArgumentDecl);
282-
auto recordArgumentDeclRef =
283-
UnresolvedDeclRefExpr::createImplicit(C, recordArgumentDecl->getName());
284282

285283
for (auto param : *thunk->getParameters()) {
284+
auto recordArgumentDeclRef = UnresolvedDeclRefExpr::createImplicit(
285+
C, recordArgumentDecl->getName());
286+
286287
auto recordArgArgsList = ArgumentList::forImplicitCallTo(
287288
recordArgumentDeclRef->getName(),
288289
{
@@ -291,6 +292,7 @@ deriveBodyDistributed_thunk(AbstractFunctionDecl *thunk, void *context) {
291292
AccessSemantics::Ordinary,
292293
thunk->mapTypeIntoContext(param->getInterfaceType()))
293294
}, C);
295+
294296
auto tryRecordArgExpr = TryExpr::createImplicit(C, sloc,
295297
CallExpr::createImplicit(C,
296298
UnresolvedDotExpr::createImplicit(C,

0 commit comments

Comments
 (0)