@@ -40,13 +40,18 @@ struct CatchTypeInfo {
40
40
41
41
// / A protected scope for zero-cost EH handling.
42
42
class EHScope {
43
+ public:
44
+ enum Kind { Cleanup, Catch, Terminate, Filter };
45
+
46
+ private:
43
47
llvm::BasicBlock *CachedLandingPad;
44
48
llvm::BasicBlock *CachedEHDispatchBlock;
45
49
46
50
EHScopeStack::stable_iterator EnclosingEHScope;
47
51
48
52
class CommonBitFields {
49
53
friend class EHScope ;
54
+ LLVM_PREFERRED_TYPE (Kind)
50
55
unsigned Kind : 3 ;
51
56
};
52
57
enum { NumCommonBits = 3 };
@@ -64,21 +69,27 @@ class EHScope {
64
69
unsigned : NumCommonBits;
65
70
66
71
// / Whether this cleanup needs to be run along normal edges.
72
+ LLVM_PREFERRED_TYPE (bool )
67
73
unsigned IsNormalCleanup : 1 ;
68
74
69
75
// / Whether this cleanup needs to be run along exception edges.
76
+ LLVM_PREFERRED_TYPE (bool )
70
77
unsigned IsEHCleanup : 1 ;
71
78
72
79
// / Whether this cleanup is currently active.
80
+ LLVM_PREFERRED_TYPE (bool )
73
81
unsigned IsActive : 1 ;
74
82
75
83
// / Whether this cleanup is a lifetime marker
84
+ LLVM_PREFERRED_TYPE (bool )
76
85
unsigned IsLifetimeMarker : 1 ;
77
86
78
87
// / Whether the normal cleanup should test the activation flag.
88
+ LLVM_PREFERRED_TYPE (bool )
79
89
unsigned TestFlagInNormalCleanup : 1 ;
80
90
81
91
// / Whether the EH cleanup should test the activation flag.
92
+ LLVM_PREFERRED_TYPE (bool )
82
93
unsigned TestFlagInEHCleanup : 1 ;
83
94
84
95
// / The amount of extra storage needed by the Cleanup.
@@ -101,8 +112,6 @@ class EHScope {
101
112
};
102
113
103
114
public:
104
- enum Kind { Cleanup, Catch, Terminate, Filter };
105
-
106
115
EHScope (Kind kind, EHScopeStack::stable_iterator enclosingEHScope)
107
116
: CachedLandingPad(nullptr ), CachedEHDispatchBlock(nullptr ),
108
117
EnclosingEHScope (enclosingEHScope) {
0 commit comments