Mark empty default constructors as =default if it makes the type POD

NFC

llvm-svn: 234694
This commit is contained in:
Benjamin Kramer 2015-04-11 18:57:14 +00:00
parent 00851732f5
commit a304c427ee
8 changed files with 8 additions and 13 deletions

View File

@ -30,7 +30,7 @@ public:
class HandleBase {
public:
HandleBase() {}
HandleBase() = default;
explicit HandleBase(const DebugEpochBase *) {}
bool isHandleInSync() const { return true; }
const void *getEpochAddress() const { return nullptr; }

View File

@ -75,7 +75,7 @@ class hash_code {
public:
/// \brief Default construct a hash_code.
/// Note that this leaves the value uninitialized.
hash_code() {}
hash_code() = default;
/// \brief Form a hash code directly from a numerical value.
hash_code(size_t value) : value(value) {}

View File

@ -150,7 +150,7 @@ class iterator_adaptor_base
protected:
WrappedIteratorT I;
iterator_adaptor_base() {}
iterator_adaptor_base() = default;
template <typename U>
explicit iterator_adaptor_base(
@ -231,7 +231,7 @@ struct pointee_iterator
pointee_iterator<WrappedIteratorT>, WrappedIteratorT,
typename std::iterator_traits<WrappedIteratorT>::iterator_category,
T> {
pointee_iterator() {}
pointee_iterator() = default;
template <typename U>
pointee_iterator(U &&u)
: pointee_iterator::iterator_adaptor_base(std::forward<U &&>(u)) {}

View File

@ -120,7 +120,7 @@ class UniqueID {
uint64_t File;
public:
UniqueID() {}
UniqueID() = default;
UniqueID(uint64_t Device, uint64_t File) : Device(Device), File(File) {}
bool operator==(const UniqueID &Other) const {
return Device == Other.Device && File == Other.File;

View File

@ -163,7 +163,7 @@ namespace {
static const char *const BlockTag;
static const char *const EdgeTag;
GCOVRecord() {}
GCOVRecord() = default;
void writeBytes(const char *Bytes, int Size) {
os->write(Bytes, Size);

View File

@ -41,9 +41,9 @@ struct PointerOffsetPair {
};
struct LoadPOPPair {
LoadPOPPair() = default;
LoadPOPPair(LoadInst *L, PointerOffsetPair P, unsigned O)
: Load(L), POP(P), InsertOrder(O) {}
LoadPOPPair() {}
LoadInst *Load;
PointerOffsetPair POP;
/// \brief The new load needs to be created before the first load in IR order.

View File

@ -112,8 +112,6 @@ public:
/// a particular register.
SmallBitVector UsedByIndices;
RegSortData() {}
void print(raw_ostream &OS) const;
void dump() const;
};

View File

@ -253,10 +253,7 @@ binary_le_impl<value_type> binary_le(value_type V) {
return binary_le_impl<value_type>(V);
}
template <size_t NumBytes>
struct zeros_impl {
zeros_impl() {}
};
template <size_t NumBytes> struct zeros_impl {};
template <size_t NumBytes>
raw_ostream &operator<<(raw_ostream &OS, const zeros_impl<NumBytes> &) {