[Orc] Use '= default' for move constructor/assignment as per dblaikie's review.
[oota-llvm.git] / include / llvm / ExecutionEngine / Orc / CompileOnDemandLayer.h
index 640ea04a416be3f7806bc229a0f0ea2e834d7fb4..a72805d2af9633b634f301eecc2fd7e53534ee1f 100644 (file)
@@ -44,7 +44,7 @@ class CompileOnDemandLayer {
 private:
 
   template <typename MaterializerFtor>
-  class LambdaMaterializer : public ValueMaterializer {
+  class LambdaMaterializer final : public ValueMaterializer {
   public:
     LambdaMaterializer(MaterializerFtor M) : M(std::move(M)) {}
     Value* materializeValueFor(Value *V) final {
@@ -69,21 +69,12 @@ private:
 
     LogicalModuleResources() {}
 
-    LogicalModuleResources(LogicalModuleResources &&Other) {
-      SourceModule = std::move(Other.SourceModule);
-      StubsToClone = std::move(StubsToClone);
-      StubsMgr = std::move(StubsMgr);
-    }
-
     // Explicit move constructor to make MSVC happy.
-    LogicalModuleResources& operator=(LogicalModuleResources &&Other) {
-      SourceModule = std::move(Other.SourceModule);
-      StubsToClone = std::move(StubsToClone);
-      StubsMgr = std::move(StubsMgr);
-      return *this;
-    }
+    LogicalModuleResources(LogicalModuleResources &&Other) = default;
 
     // Explicit move assignment to make MSVC happy.
+    LogicalModuleResources& operator=(LogicalModuleResources &&Other) = default;
+
     JITSymbol findSymbol(StringRef Name, bool ExportedSymbolsOnly) {
       if (Name.endswith("$stub_ptr") && !ExportedSymbolsOnly) {
         assert(!ExportedSymbolsOnly && "Stubs are never exported");