File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
include/swift/SILOptimizer/Analysis Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -83,14 +83,13 @@ class SILAnalysis : public DeleteNotificationHandler {
83
83
bool invalidationLock;
84
84
85
85
public:
86
-
87
86
// / Returns the kind of derived class.
88
87
AnalysisKind getKind () const { return kind; }
89
88
90
- // / C'tor .
89
+ // / Constructor .
91
90
SILAnalysis (AnalysisKind k) : kind(k), invalidationLock(false ) {}
92
91
93
- // / D'tor .
92
+ // / Destructor .
94
93
virtual ~SILAnalysis () {}
95
94
96
95
// / Can be used to retrieve other analysis passes from \p PM, which this
@@ -137,10 +136,12 @@ class SILAnalysis : public DeleteNotificationHandler {
137
136
static void verifyFunction (SILFunction *F);
138
137
};
139
138
140
- // RAII helper for locking analyses.
139
+ // / RAII helper for locking analyses. Locks the analysis upon construction and
140
+ // / unlocks upon destruction.
141
141
class AnalysisPreserver {
142
142
SILAnalysis *analysis;
143
- public:
143
+
144
+ public:
144
145
AnalysisPreserver (SILAnalysis *a) : analysis(a) {
145
146
analysis->lockInvalidation ();
146
147
}
You can’t perform that action at this time.
0 commit comments