[compiler-rt] r251717 - Revert "Apply modernize-use-default to compiler-rt."
Alexey Samsonov via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 30 11:52:31 PDT 2015
Author: samsonov
Date: Fri Oct 30 13:52:31 2015
New Revision: 251717
URL: http://llvm.org/viewvc/llvm-project?rev=251717&view=rev
Log:
Revert "Apply modernize-use-default to compiler-rt."
This reverts commit r250823.
Replacing at least some of empty
constructors with "= default" variants is a semantical change which we
don't want. E.g. __tsan::ClockBlock contains a union of large arrays,
and it's critical for correctness and performance that we don't memset()
these arrays in the constructor.
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=251717&r1=251716&r2=251717&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_fake_stack.h (original)
+++ compiler-rt/trunk/lib/asan/asan_fake_stack.h Fri Oct 30 13:52:31 2015
@@ -155,7 +155,7 @@ class FakeStack {
void ForEachFakeFrame(RangeIteratorCallback callback, void *arg);
private:
- FakeStack() = default;
+ FakeStack() { }
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=251717&r1=251716&r2=251717&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/msan_allocator.h (original)
+++ compiler-rt/trunk/lib/msan/msan_allocator.h Fri Oct 30 13:52:31 2015
@@ -26,7 +26,7 @@ struct MsanThreadLocalMallocStorage {
private:
// These objects are allocated via mmap() and are zero-initialized.
- MsanThreadLocalMallocStorage() = default;
+ MsanThreadLocalMallocStorage() {}
};
} // 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=251717&r1=251716&r2=251717&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_bitvector.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_bitvector.h Fri Oct 30 13:52:31 2015
@@ -87,7 +87,7 @@ class BasicBitVector {
// }
class Iterator {
public:
- Iterator() = default;
+ Iterator() { }
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() = default;
+ Iterator() { }
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=251717&r1=251716&r2=251717&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_clock.h (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_clock.h Fri Oct 30 13:52:31 2015
@@ -33,7 +33,8 @@ struct ClockBlock {
ClockElem clock[kClockCount];
};
- ClockBlock() = default;
+ ClockBlock() {
+ }
};
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=251717&r1=251716&r2=251717&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_mutex.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_mutex.cc Fri Oct 30 13:52:31 2015
@@ -126,8 +126,9 @@ void InitializeMutex() {
#endif
}
-// Rely on zero initialization because some mutexes can be locked before ctor.
-InternalDeadlockDetector::InternalDeadlockDetector() = default;
+InternalDeadlockDetector::InternalDeadlockDetector() {
+ // Rely on zero initialization because some mutexes can be locked before ctor.
+}
#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=251717&r1=251716&r2=251717&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc Fri Oct 30 13:52:31 2015
@@ -67,8 +67,9 @@ ReportMop::ReportMop()
: mset(MBlockReportMutex) {
}
-// FIXME(dvyukov): it must be leaking a lot of memory.
-ReportDesc::~ReportDesc() = default;
+ReportDesc::~ReportDesc() {
+ // FIXME(dvyukov): it must be leaking a lot of memory.
+}
#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=251717&r1=251716&r2=251717&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_thread.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_thread.cc Fri Oct 30 13:52:31 2015
@@ -31,7 +31,8 @@ ThreadContext::ThreadContext(int tid)
}
#ifndef SANITIZER_GO
-ThreadContext::~ThreadContext() = default;
+ThreadContext::~ThreadContext() {
+}
#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=251717&r1=251716&r2=251717&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/ubsan_diag.h (original)
+++ compiler-rt/trunk/lib/ubsan/ubsan_diag.h Fri Oct 30 13:52:31 2015
@@ -150,7 +150,7 @@ public:
/// An individual diagnostic message argument.
struct Arg {
- Arg() = default;
+ Arg() {}
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