Skip to content

Commit 65ffed3

Browse files
committed
[CanonicalizeOSSALifetime] Minor cleanup.
1 parent 2c5ee0f commit 65ffed3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

include/swift/SILOptimizer/Utils/CanonicalizeOSSALifetime.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ void diagnoseRequiredCopyOfMoveOnly(Operand *use,
130130
///
131131
/// This result remains valid during copy rewriting. The only instructions
132132
/// referenced it contains are consumes that cannot be deleted.
133-
class CanonicalOSSAConsumeInfo {
133+
class CanonicalOSSAConsumeInfo final {
134134
/// Map blocks on the lifetime boundary to the last consuming instruction.
135135
llvm::SmallDenseMap<SILBasicBlock *, SILInstruction *, 4> finalBlockConsumes;
136136

@@ -159,6 +159,10 @@ class CanonicalOSSAConsumeInfo {
159159
return false;
160160
}
161161

162+
CanonicalOSSAConsumeInfo() {}
163+
CanonicalOSSAConsumeInfo(CanonicalOSSAConsumeInfo const &) = delete;
164+
CanonicalOSSAConsumeInfo &
165+
operator=(CanonicalOSSAConsumeInfo const &) = delete;
162166
SWIFT_ASSERT_ONLY_DECL(void dump() const LLVM_ATTRIBUTE_USED);
163167
};
164168

@@ -169,7 +173,7 @@ class CanonicalOSSAConsumeInfo {
169173
///
170174
/// TODO: Move all the private per-definition members into an implementation
171175
/// class in the .cpp file.
172-
class CanonicalizeOSSALifetime {
176+
class CanonicalizeOSSALifetime final {
173177
public:
174178
/// Find the original definition of a potentially copied value. \p copiedValue
175179
/// must be an owned value. It is usually a copy but may also be a destroy.
@@ -331,7 +335,7 @@ class CanonicalizeOSSALifetime {
331335

332336
InstModCallbacks &getCallbacks() { return deleter.getCallbacks(); }
333337

334-
protected:
338+
private:
335339
void recordDebugValue(DebugValueInst *dvi) { debugValues.insert(dvi); }
336340

337341
void recordConsumingUse(Operand *use) {

0 commit comments

Comments
 (0)