[llvm] r285302 - Remove duplicated default move ctors/move assign. No functional change.

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 27 08:23:45 PDT 2016


Author: d0k
Date: Thu Oct 27 10:23:44 2016
New Revision: 285302

URL: http://llvm.org/viewvc/llvm-project?rev=285302&view=rev
Log:
Remove duplicated default move ctors/move assign. No functional change.

Modified:
    llvm/trunk/tools/dsymutil/DebugMap.h
    llvm/trunk/tools/llvm-cov/SourceCoverageView.h

Modified: llvm/trunk/tools/dsymutil/DebugMap.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/dsymutil/DebugMap.h?rev=285302&r1=285301&r2=285302&view=diff
==============================================================================
--- llvm/trunk/tools/dsymutil/DebugMap.h (original)
+++ llvm/trunk/tools/dsymutil/DebugMap.h Thu Oct 27 10:23:44 2016
@@ -176,19 +176,8 @@ private:
   DebugMapObject() = default;
 
 public:
-  DebugMapObject &operator=(DebugMapObject RHS) {
-    std::swap(Filename, RHS.Filename);
-    std::swap(Timestamp, RHS.Timestamp);
-    std::swap(Symbols, RHS.Symbols);
-    std::swap(AddressToMapping, RHS.AddressToMapping);
-    return *this;
-  }
-  DebugMapObject(DebugMapObject &&RHS) {
-    Filename = std::move(RHS.Filename);
-    Timestamp = std::move(RHS.Timestamp);
-    Symbols = std::move(RHS.Symbols);
-    AddressToMapping = std::move(RHS.AddressToMapping);
-  }
+  DebugMapObject(DebugMapObject &&) = default;
+  DebugMapObject &operator=(DebugMapObject &&) = default;
   ///@}
 };
 }

Modified: llvm/trunk/tools/llvm-cov/SourceCoverageView.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-cov/SourceCoverageView.h?rev=285302&r1=285301&r2=285302&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-cov/SourceCoverageView.h (original)
+++ llvm/trunk/tools/llvm-cov/SourceCoverageView.h Thu Oct 27 10:23:44 2016
@@ -57,15 +57,6 @@ struct InstantiationView {
   InstantiationView(StringRef FunctionName, unsigned Line,
                     std::unique_ptr<SourceCoverageView> View)
       : FunctionName(FunctionName), Line(Line), View(std::move(View)) {}
-  InstantiationView(InstantiationView &&RHS)
-      : FunctionName(std::move(RHS.FunctionName)), Line(std::move(RHS.Line)),
-        View(std::move(RHS.View)) {}
-  InstantiationView &operator=(InstantiationView &&RHS) {
-    FunctionName = std::move(RHS.FunctionName);
-    Line = std::move(RHS.Line);
-    View = std::move(RHS.View);
-    return *this;
-  }
 
   friend bool operator<(const InstantiationView &LHS,
                         const InstantiationView &RHS) {




More information about the llvm-commits mailing list