Skip to content

Commit 58ed3f0

Browse files
committed
[Distributed] More IRGenMangler fixes for distributed thunks
We also need to mangle the dispatch thunks to distributed thunks uniquely.
1 parent d49dd18 commit 58ed3f0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/IRGen/IRGenMangler.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ class IRGenMangler : public Mangle::ASTMangler {
5151
beginMangling();
5252
appendEntity(func);
5353
appendOperator("Tj");
54+
if (func->isDistributedThunk())
55+
appendSymbolKind(SymbolKind::DistributedThunk);
5456
return finalize();
5557
}
5658

@@ -69,6 +71,8 @@ class IRGenMangler : public Mangle::ASTMangler {
6971
derivativeId->getDerivativeGenericSignature());
7072
appendAutoDiffFunctionParts("TJ", kind, config);
7173
appendOperator("Tj");
74+
if (func->isDistributedThunk())
75+
appendSymbolKind(SymbolKind::DistributedThunk);
7276
return finalize();
7377
}
7478

@@ -104,6 +108,8 @@ class IRGenMangler : public Mangle::ASTMangler {
104108
derivativeId->getDerivativeGenericSignature());
105109
appendAutoDiffFunctionParts("TJ", kind, config);
106110
appendOperator("Tq");
111+
if (func->isDistributedThunk())
112+
appendSymbolKind(SymbolKind::DistributedThunk);
107113
return finalize();
108114
}
109115

0 commit comments

Comments
 (0)