<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 19, 2015 at 11:59 AM, Lang Hames via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: lhames<br>
Date: Mon Oct 19 13:59:22 2015<br>
New Revision: 250722<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=250722&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=250722&view=rev</a><br>
Log:<br>
[Orc] Add explicit move constructor and assignment operator to make MSVC happy.<br>
<br>
Modified:<br>
    llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h?rev=250722&r1=250721&r2=250722&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h?rev=250722&r1=250721&r2=250722&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h Mon Oct 19 13:59:22 2015<br>
@@ -22,6 +22,7 @@<br>
 #include "llvm/ExecutionEngine/SectionMemoryManager.h"<br>
 #include "llvm/Transforms/Utils/Cloning.h"<br>
 #include <list><br>
+#include <memory><br>
 #include <set><br>
<br>
 #include "llvm/Support/Debug.h"<br>
@@ -66,6 +67,23 @@ private:<br>
     std::set<const Function*> StubsToClone;<br>
     std::unique_ptr<IndirectStubsMgrT> StubsMgr;<br>
<br>
+    LogicalModuleResources() {}<br></blockquote><div><br></div><div>I'd prefer "= default" here (I think MSVC supports = default on default/copy/dtor, just doesn't know how to generate implicit move ops). Not sure it makes any real difference, though.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
+    LogicalModuleResources(LogicalModuleResources &&Other) {<br>
+      SourceModule = std::move(Other.SourceModule);<br>
+      StubsToClone = std::move(StubsToClone);<br>
+      StubsMgr = std::move(StubsMgr);<br></blockquote><div><br></div><div>Prefer the move ctors rather than default construct+move assign?<br><br>LogicalModuleResources(LogicalModuleResoruces&& Other) : SourceModule(std::move(Other.SourceModule)), ... </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+    }<br>
+<br>
+    // Explicit move constructor to make MSVC happy.<br></blockquote><div><br>Comment seems out of place ^<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+    LogicalModuleResources& operator=(LogicalModuleResources &&Other) {<br>
+      SourceModule = std::move(Other.SourceModule);<br>
+      StubsToClone = std::move(StubsToClone);<br>
+      StubsMgr = std::move(StubsMgr);<br>
+      return *this;<br>
+    }<br>
+<br>
+    // Explicit move assignment to make MSVC happy.<br></blockquote><div><br></div><div>this one too ^</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
     JITSymbol findSymbol(StringRef Name, bool ExportedSymbolsOnly) {<br>
       if (Name.endswith("$stub_ptr") && !ExportedSymbolsOnly) {<br>
         assert(!ExportedSymbolsOnly && "Stubs are never exported");<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>