[compiler-rt] r250823 - Apply modernize-use-default to compiler-rt.
Angel Garcia Gomez via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 20 05:53:50 PDT 2015
Author: angelgarcia
Date: Tue Oct 20 07:53:50 2015
New Revision: 250823
URL: http://llvm.org/viewvc/llvm-project?rev=250823&view=rev
Log:
Apply modernize-use-default to compiler-rt.
Summary: Replace empty bodies of default constructors and destructors with '= default'.
Reviewers: klimek, bkramer
Subscribers: alexfh, cfe-commits
Differential Revision: http://reviews.llvm.org/D13892
Modified:
compiler-rt/trunk/lib/asan/asan_fake_stack.h
compiler-rt/trunk/lib/msan/msan_allocator.h
compiler-rt/trunk/lib/sanitizer_common/sanitizer_bitvector.h
compiler-rt/trunk/lib/tsan/rtl/tsan_clock.h
compiler-rt/trunk/lib/tsan/rtl/tsan_mutex.cc
compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc
compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_thread.cc
compiler-rt/trunk/lib/ubsan/ubsan_diag.h
Modified: compiler-rt/trunk/lib/asan/asan_fake_stack.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_fake_stack.h?rev=250823&r1=250822&r2=250823&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_fake_stack.h (original)
+++ compiler-rt/trunk/lib/asan/asan_fake_stack.h Tue Oct 20 07:53:50 2015
@@ -155,7 +155,7 @@ class FakeStack {
void ForEachFakeFrame(RangeIteratorCallback callback, void *arg);
private:
- FakeStack() { }
+ FakeStack() = default;
static const uptr kFlagsOffset = 4096; // This is were the flags begin.
// Must match the number of uses of DEFINE_STACK_MALLOC_FREE_WITH_CLASS_ID
COMPILER_CHECK(kNumberOfSizeClasses == 11);
Modified: compiler-rt/trunk/lib/msan/msan_allocator.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/msan_allocator.h?rev=250823&r1=250822&r2=250823&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/msan_allocator.h (original)
+++ compiler-rt/trunk/lib/msan/msan_allocator.h Tue Oct 20 07:53:50 2015
@@ -26,7 +26,7 @@ struct MsanThreadLocalMallocStorage {
private:
// These objects are allocated via mmap() and are zero-initialized.
- MsanThreadLocalMallocStorage() {}
+ MsanThreadLocalMallocStorage() = default;
};
} // namespace __msan
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_bitvector.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_bitvector.h?rev=250823&r1=250822&r2=250823&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_bitvector.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_bitvector.h Tue Oct 20 07:53:50 2015
@@ -87,7 +87,7 @@ class BasicBitVector {
// }
class Iterator {
public:
- Iterator() { }
+ Iterator() = default;
explicit Iterator(const BasicBitVector &bv) : bv_(bv) {}
bool hasNext() const { return !bv_.empty(); }
uptr next() { return bv_.getAndClearFirstOne(); }
@@ -273,7 +273,7 @@ class TwoLevelBitVector {
// }
class Iterator {
public:
- Iterator() { }
+ Iterator() = default;
explicit Iterator(const TwoLevelBitVector &bv) : bv_(bv), i0_(0), i1_(0) {
it1_.clear();
it2_.clear();
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_clock.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_clock.h?rev=250823&r1=250822&r2=250823&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_clock.h (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_clock.h Tue Oct 20 07:53:50 2015
@@ -33,8 +33,7 @@ struct ClockBlock {
ClockElem clock[kClockCount];
};
- ClockBlock() {
- }
+ ClockBlock() = default;
};
typedef DenseSlabAlloc<ClockBlock, 1<<16, 1<<10> ClockAlloc;
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_mutex.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_mutex.cc?rev=250823&r1=250822&r2=250823&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_mutex.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_mutex.cc Tue Oct 20 07:53:50 2015
@@ -126,9 +126,8 @@ void InitializeMutex() {
#endif
}
-InternalDeadlockDetector::InternalDeadlockDetector() {
- // Rely on zero initialization because some mutexes can be locked before ctor.
-}
+// Rely on zero initialization because some mutexes can be locked before ctor.
+InternalDeadlockDetector::InternalDeadlockDetector() = default;
#if SANITIZER_DEBUG && !SANITIZER_GO
void InternalDeadlockDetector::Lock(MutexType t) {
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc?rev=250823&r1=250822&r2=250823&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc Tue Oct 20 07:53:50 2015
@@ -67,9 +67,8 @@ ReportMop::ReportMop()
: mset(MBlockReportMutex) {
}
-ReportDesc::~ReportDesc() {
- // FIXME(dvyukov): it must be leaking a lot of memory.
-}
+// FIXME(dvyukov): it must be leaking a lot of memory.
+ReportDesc::~ReportDesc() = default;
#ifndef SANITIZER_GO
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_thread.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_thread.cc?rev=250823&r1=250822&r2=250823&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_thread.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_thread.cc Tue Oct 20 07:53:50 2015
@@ -31,8 +31,7 @@ ThreadContext::ThreadContext(int tid)
}
#ifndef SANITIZER_GO
-ThreadContext::~ThreadContext() {
-}
+ThreadContext::~ThreadContext() = default;
#endif
void ThreadContext::OnDead() {
Modified: compiler-rt/trunk/lib/ubsan/ubsan_diag.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/ubsan_diag.h?rev=250823&r1=250822&r2=250823&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/ubsan_diag.h (original)
+++ compiler-rt/trunk/lib/ubsan/ubsan_diag.h Tue Oct 20 07:53:50 2015
@@ -150,7 +150,7 @@ public:
/// An individual diagnostic message argument.
struct Arg {
- Arg() {}
+ Arg() = default;
Arg(const char *String) : Kind(AK_String), String(String) {}
Arg(TypeName TN) : Kind(AK_TypeName), String(TN.getName()) {}
Arg(UIntMax UInt) : Kind(AK_UInt), UInt(UInt) {}
More information about the llvm-commits
mailing list