Mark empty default constructors as =default if it makes the type POD
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 11 Apr 2015 18:57:14 +0000 (18:57 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 11 Apr 2015 18:57:14 +0000 (18:57 +0000)
NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234694 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/EpochTracker.h
include/llvm/ADT/Hashing.h
include/llvm/ADT/iterator.h
include/llvm/Support/FileSystem.h
lib/Transforms/Instrumentation/GCOVProfiling.cpp
lib/Transforms/Scalar/LoadCombine.cpp
lib/Transforms/Scalar/LoopStrengthReduce.cpp
tools/yaml2obj/yaml2coff.cpp

index d593073317b101ea80036b4f85ebaeb35a29a651..582d58179d137571e3246b5c9f27755660c3431c 100644 (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; }
index a1e78642e94c90f818c6a606fc743c7f7cf25c63..77e6d77b1b8e6b1ed2a0cfbf026c7b491d882d26 100644 (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) {}
index e2c9e5ea6bdae1b736018425449271c4c3b8b2ee..54a288df01736980b4bc32f1e480befb3c06ca24 100644 (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)) {}
index b3b44c46653be431b851d8922d00d51f6b789f31..a736c324f8aae2bf46de853d84ff82bf9d784e52 100644 (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;
index 129afe2a93170a2251aa66d8bc0ff59339994a02..b94124fb2f64be04ee0481ea9298d869b1d2f61b 100644 (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);
index 1f33f72d302883dcf23cf91e9ee84ba0925813fd..c19cd19059b238f80bd7c3f63040d19e6a5066a0 100644 (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.
index 31878d3a85bbdad5cd850a0ec25912e854585c7b..099f227af55f977ca39dd6735eabf2836c239018 100644 (file)
@@ -112,8 +112,6 @@ public:
   /// a particular register.
   SmallBitVector UsedByIndices;
 
-  RegSortData() {}
-
   void print(raw_ostream &OS) const;
   void dump() const;
 };
index 6939bc4a3455c52226c23601ec83caec3a97baf0..61d985192552be60b9dd8818c925118327c35710 100644 (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> &) {