Skip to content

[gardening] Fixup a couple of doxygen comments. #17961

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions include/swift/SILOptimizer/Analysis/Analysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,13 @@ class SILAnalysis : public DeleteNotificationHandler {
bool invalidationLock;

public:

/// Returns the kind of derived class.
AnalysisKind getKind() const { return kind; }

/// C'tor.
/// Constructor.
SILAnalysis(AnalysisKind k) : kind(k), invalidationLock(false) {}

/// D'tor.
/// Destructor.
virtual ~SILAnalysis() {}

/// Can be used to retrieve other analysis passes from \p PM, which this
Expand Down Expand Up @@ -137,10 +136,12 @@ class SILAnalysis : public DeleteNotificationHandler {
static void verifyFunction(SILFunction *F);
};

// RAII helper for locking analyses.
/// RAII helper for locking analyses. Locks the analysis upon construction and
/// unlocks upon destruction.
class AnalysisPreserver {
SILAnalysis *analysis;
public:

public:
AnalysisPreserver(SILAnalysis *a) : analysis(a) {
analysis->lockInvalidation();
}
Expand Down