Skip to content

Commit 9b3662e

Browse files
committed
[Distributed] print distributed(_thunk) in SILPrinter
1 parent d49dd18 commit 9b3662e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

lib/SIL/IR/SILPrinter.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,11 +332,27 @@ void SILDeclRef::print(raw_ostream &OS) const {
332332
auto *accessor = dyn_cast<AccessorDecl>(getDecl());
333333
if (!accessor) {
334334
printValueDecl(getDecl(), OS);
335+
if (isDistributed()) {
336+
OS << "!distributed";
337+
OS << "(" << getDecl() << ")";
338+
}
339+
if (isDistributedThunk()) {
340+
OS << "!distributed_thunk";
341+
OS << "(" << getDecl() << ")";
342+
}
335343
isDot = false;
336344
break;
337345
}
338346

339347
printValueDecl(accessor->getStorage(), OS);
348+
if (isDistributed()) {
349+
OS << "!distributed";
350+
OS << "(" << getDecl() << ")";
351+
}
352+
if (isDistributedThunk()) {
353+
OS << "!distributed_thunk";
354+
OS << "(" << getDecl() << ")";
355+
}
340356
switch (accessor->getAccessorKind()) {
341357
case AccessorKind::WillSet:
342358
OS << "!willSet";

0 commit comments

Comments
 (0)