|
18 | 18 | #ifndef SWIFT_BASIC_DIAGNOSTICENGINE_H
|
19 | 19 | #define SWIFT_BASIC_DIAGNOSTICENGINE_H
|
20 | 20 |
|
| 21 | +#include "swift/AST/ActorIsolation.h" |
21 | 22 | #include "swift/AST/DeclNameLoc.h"
|
22 | 23 | #include "swift/AST/DiagnosticConsumer.h"
|
23 | 24 | #include "swift/AST/TypeLoc.h"
|
@@ -93,6 +94,7 @@ namespace swift {
|
93 | 94 | DeclAttribute,
|
94 | 95 | VersionTuple,
|
95 | 96 | LayoutConstraint,
|
| 97 | + ActorIsolation, |
96 | 98 | };
|
97 | 99 |
|
98 | 100 | namespace diag {
|
@@ -122,6 +124,7 @@ namespace swift {
|
122 | 124 | const DeclAttribute *DeclAttributeVal;
|
123 | 125 | llvm::VersionTuple VersionVal;
|
124 | 126 | LayoutConstraint LayoutConstraintVal;
|
| 127 | + ActorIsolation ActorIsolationVal; |
125 | 128 | };
|
126 | 129 |
|
127 | 130 | public:
|
@@ -209,6 +212,12 @@ namespace swift {
|
209 | 212 | DiagnosticArgument(LayoutConstraint L)
|
210 | 213 | : Kind(DiagnosticArgumentKind::LayoutConstraint), LayoutConstraintVal(L) {
|
211 | 214 | }
|
| 215 | + |
| 216 | + DiagnosticArgument(ActorIsolation AI) |
| 217 | + : Kind(DiagnosticArgumentKind::ActorIsolation), |
| 218 | + ActorIsolationVal(AI) { |
| 219 | + } |
| 220 | + |
212 | 221 | /// Initializes a diagnostic argument using the underlying type of the
|
213 | 222 | /// given enum.
|
214 | 223 | template<
|
@@ -299,6 +308,11 @@ namespace swift {
|
299 | 308 | assert(Kind == DiagnosticArgumentKind::LayoutConstraint);
|
300 | 309 | return LayoutConstraintVal;
|
301 | 310 | }
|
| 311 | + |
| 312 | + ActorIsolation getAsActorIsolation() const { |
| 313 | + assert(Kind == DiagnosticArgumentKind::ActorIsolation); |
| 314 | + return ActorIsolationVal; |
| 315 | + } |
302 | 316 | };
|
303 | 317 |
|
304 | 318 | struct DiagnosticFormatOptions {
|
|
0 commit comments