Skip to content

Commit 995c508

Browse files
theidexistedmemfrob
authored andcommitted
[Compiler-rt] Add delete for noncopyable
Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D105077
1 parent 314aab2 commit 995c508

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_mutex.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ class SpinMutex : public StaticSpinMutex {
6666
}
6767

6868
private:
69-
SpinMutex(const SpinMutex&);
70-
void operator=(const SpinMutex&);
69+
SpinMutex(const SpinMutex &) = delete;
70+
void operator=(const SpinMutex &) = delete;
7171
};
7272

7373
class BlockingMutex {
@@ -171,8 +171,8 @@ class RWMutex {
171171
}
172172
}
173173

174-
RWMutex(const RWMutex&);
175-
void operator = (const RWMutex&);
174+
RWMutex(const RWMutex &) = delete;
175+
void operator=(const RWMutex &) = delete;
176176
};
177177

178178
template<typename MutexType>
@@ -190,8 +190,8 @@ class GenericScopedLock {
190190
private:
191191
MutexType *mu_;
192192

193-
GenericScopedLock(const GenericScopedLock&);
194-
void operator=(const GenericScopedLock&);
193+
GenericScopedLock(const GenericScopedLock &) = delete;
194+
void operator=(const GenericScopedLock &) = delete;
195195
};
196196

197197
template<typename MutexType>
@@ -209,8 +209,8 @@ class GenericScopedReadLock {
209209
private:
210210
MutexType *mu_;
211211

212-
GenericScopedReadLock(const GenericScopedReadLock&);
213-
void operator=(const GenericScopedReadLock&);
212+
GenericScopedReadLock(const GenericScopedReadLock &) = delete;
213+
void operator=(const GenericScopedReadLock &) = delete;
214214
};
215215

216216
typedef GenericScopedLock<StaticSpinMutex> SpinMutexLock;

0 commit comments

Comments
 (0)