mirror of
https://github.com/darlinghq/darling-compiler-rt.git
synced 2024-11-27 05:40:31 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251717 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8f11ffecd8
commit
6f7eaaad04
@ -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);
|
||||
|
@ -26,7 +26,7 @@ struct MsanThreadLocalMallocStorage {
|
||||
|
||||
private:
|
||||
// These objects are allocated via mmap() and are zero-initialized.
|
||||
MsanThreadLocalMallocStorage() = default;
|
||||
MsanThreadLocalMallocStorage() {}
|
||||
};
|
||||
|
||||
} // namespace __msan
|
||||
|
@ -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();
|
||||
|
@ -33,7 +33,8 @@ struct ClockBlock {
|
||||
ClockElem clock[kClockCount];
|
||||
};
|
||||
|
||||
ClockBlock() = default;
|
||||
ClockBlock() {
|
||||
}
|
||||
};
|
||||
|
||||
typedef DenseSlabAlloc<ClockBlock, 1<<16, 1<<10> ClockAlloc;
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
||||
|
@ -31,7 +31,8 @@ ThreadContext::ThreadContext(int tid)
|
||||
}
|
||||
|
||||
#ifndef SANITIZER_GO
|
||||
ThreadContext::~ThreadContext() = default;
|
||||
ThreadContext::~ThreadContext() {
|
||||
}
|
||||
#endif
|
||||
|
||||
void ThreadContext::OnDead() {
|
||||
|
@ -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) {}
|
||||
|
Loading…
Reference in New Issue
Block a user