[compiler-rt] ae7c395 - [Compiler-rt] Add delete for noncopyable

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 30 20:53:57 PDT 2021


Author: theidexisted
Date: 2021-06-30T20:53:47-07:00
New Revision: ae7c3959e0e9a9f6acb854f2eb9afd32fa930168

URL: https://github.com/llvm/llvm-project/commit/ae7c3959e0e9a9f6acb854f2eb9afd32fa930168
DIFF: https://github.com/llvm/llvm-project/commit/ae7c3959e0e9a9f6acb854f2eb9afd32fa930168.diff

LOG: [Compiler-rt] Add delete for noncopyable

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D105077

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/sanitizer_mutex.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/sanitizer_common/sanitizer_mutex.h b/compiler-rt/lib/sanitizer_common/sanitizer_mutex.h
index 40a65914299ea..742cd6562a226 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_mutex.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_mutex.h
@@ -66,8 +66,8 @@ class SpinMutex : public StaticSpinMutex {
   }
 
  private:
-  SpinMutex(const SpinMutex&);
-  void operator=(const SpinMutex&);
+  SpinMutex(const SpinMutex &) = delete;
+  void operator=(const SpinMutex &) = delete;
 };
 
 class BlockingMutex {
@@ -171,8 +171,8 @@ class RWMutex {
     }
   }
 
-  RWMutex(const RWMutex&);
-  void operator = (const RWMutex&);
+  RWMutex(const RWMutex &) = delete;
+  void operator=(const RWMutex &) = delete;
 };
 
 template<typename MutexType>
@@ -190,8 +190,8 @@ class GenericScopedLock {
  private:
   MutexType *mu_;
 
-  GenericScopedLock(const GenericScopedLock&);
-  void operator=(const GenericScopedLock&);
+  GenericScopedLock(const GenericScopedLock &) = delete;
+  void operator=(const GenericScopedLock &) = delete;
 };
 
 template<typename MutexType>
@@ -209,8 +209,8 @@ class GenericScopedReadLock {
  private:
   MutexType *mu_;
 
-  GenericScopedReadLock(const GenericScopedReadLock&);
-  void operator=(const GenericScopedReadLock&);
+  GenericScopedReadLock(const GenericScopedReadLock &) = delete;
+  void operator=(const GenericScopedReadLock &) = delete;
 };
 
 typedef GenericScopedLock<StaticSpinMutex> SpinMutexLock;


        


More information about the llvm-commits mailing list