Skip to content

Commit 1372797

Browse files
committed
[AST] Add an EffectKind OptionSet
1 parent 3752965 commit 1372797

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

include/swift/AST/Effects.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#define SWIFT_EFFECTS_H
2727

2828
#include "swift/AST/Type.h"
29+
#include "swift/Basic/OptionSet.h"
2930

3031
#include <utility>
3132

@@ -34,11 +35,14 @@ class raw_ostream;
3435
}
3536

3637
namespace swift {
38+
class AbstractFunctionDecl;
39+
class ProtocolDecl;
3740

3841
enum class EffectKind : uint8_t {
39-
Throws,
40-
Async
42+
Throws = 1 << 0,
43+
Async = 1 << 1
4144
};
45+
using PossibleEffects = OptionSet<EffectKind>;
4246

4347
void simple_display(llvm::raw_ostream &out, const EffectKind kind);
4448

0 commit comments

Comments
 (0)