File tree Expand file tree Collapse file tree 3 files changed +36
-4
lines changed Expand file tree Collapse file tree 3 files changed +36
-4
lines changed Original file line number Diff line number Diff line change @@ -266,6 +266,8 @@ class ActorIsolation {
266
266
267
267
void print (llvm::raw_ostream &os) const ;
268
268
269
+ void printForSIL (llvm::raw_ostream &os) const ;
270
+
269
271
void printForDiagnostics (llvm::raw_ostream &os,
270
272
StringRef openingQuotationMark = " '" ) const ;
271
273
Original file line number Diff line number Diff line change @@ -1760,6 +1760,30 @@ void ActorIsolation::print(llvm::raw_ostream &os) const {
1760
1760
llvm_unreachable (" Covered switch isn't covered?!" );
1761
1761
}
1762
1762
1763
+ void ActorIsolation::printForSIL (llvm::raw_ostream &os) const {
1764
+ switch (getKind ()) {
1765
+ case Unspecified:
1766
+ os << " unspecified" ;
1767
+ return ;
1768
+ case ActorInstance:
1769
+ os << " actor_instance" ;
1770
+ return ;
1771
+ case Nonisolated:
1772
+ os << " nonisolated" ;
1773
+ return ;
1774
+ case NonisolatedUnsafe:
1775
+ os << " nonisolated_unsafe" ;
1776
+ return ;
1777
+ case GlobalActor:
1778
+ os << " global_actor" ;
1779
+ return ;
1780
+ case Erased:
1781
+ os << " erased" ;
1782
+ return ;
1783
+ }
1784
+ llvm_unreachable (" Covered switch isn't covered?!" );
1785
+ }
1786
+
1763
1787
void ActorIsolation::dumpForDiagnostics () const {
1764
1788
printForDiagnostics (llvm::dbgs ());
1765
1789
llvm::dbgs () << ' \n ' ;
Original file line number Diff line number Diff line change @@ -1550,11 +1550,17 @@ class SILPrinter : public SILInstructionVisitor<SILPrinter> {
1550
1550
*this << " [noasync] " ;
1551
1551
if (auto isolationCrossing = AI->getIsolationCrossing ()) {
1552
1552
auto callerIsolation = isolationCrossing->getCallerIsolation ();
1553
- if (callerIsolation != ActorIsolation::Unspecified)
1554
- *this << " [callee_isolation=" << callerIsolation << " ] " ;
1553
+ if (callerIsolation != ActorIsolation::Unspecified) {
1554
+ *this << " [callee_isolation=" ;
1555
+ callerIsolation.printForSIL (PrintState.OS );
1556
+ *this << " ] " ;
1557
+ }
1555
1558
auto calleeIsolation = isolationCrossing->getCalleeIsolation ();
1556
- if (calleeIsolation != ActorIsolation::Unspecified)
1557
- *this << " [caller_isolation=" << calleeIsolation << " ] " ;
1559
+ if (calleeIsolation != ActorIsolation::Unspecified) {
1560
+ *this << " [caller_isolation=" ;
1561
+ calleeIsolation.printForSIL (PrintState.OS );
1562
+ *this << " ] " ;
1563
+ }
1558
1564
}
1559
1565
visitApplyInstBase (AI);
1560
1566
}
You can’t perform that action at this time.
0 commit comments