Skip to content

Commit ac4ae90

Browse files
xedinktoso
authored andcommitted
[Distributed/Synthesis] NFC: Add a comment regarding empty internal parameter names
1 parent be460a5 commit ac4ae90

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/Sema/CodeSynthesisDistributedActor.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,9 @@ static FuncDecl *createDistributedThunkFunction(FuncDecl *func) {
531531
auto funcParam = funcParams->get(i);
532532

533533
auto paramName = funcParam->getParameterName();
534+
// If internal name is empty it could only mean either
535+
// `_:` or `x _: ...`, so let's auto-generate a name
536+
// to be used in the body of a thunk.
534537
if (paramName.empty()) {
535538
paramName = C.getIdentifier("p" + llvm::utostr(i));
536539
}

0 commit comments

Comments
 (0)