<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 23, 2015 at 2:25 PM, Reid Kleckner <span dir="ltr"><<a href="mailto:reid@kleckner.net" target="_blank">reid@kleckner.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rnk<br>
Date: Fri Jan 23 16:25:47 2015<br>
New Revision: 226949<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=226949&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=226949&view=rev</a><br>
Log:<br>
Fix the MSVC build with the new Orc JIT APIs<br>
<br>
Modified:<br>
llvm/trunk/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h<br>
llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h?rev=226949&r1=226948&r2=226949&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h?rev=226949&r1=226948&r2=226949&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h Fri Jan 23 16:25:47 2015<br>
@@ -32,11 +32,17 @@ protected:<br>
/// had been provided by this instance. Higher level layers are responsible<br>
/// for taking any action required to handle the missing symbols.<br>
class LinkedObjectSet {<br>
+ LinkedObjectSet(const LinkedObjectSet&) LLVM_DELETED_FUNCTION;<br>
+ void operator=(const LinkedObjectSet&) LLVM_DELETED_FUNCTION;<br>
public:<br>
LinkedObjectSet(std::unique_ptr<RTDyldMemoryManager> MM)<br>
: MM(std::move(MM)), RTDyld(llvm::make_unique<RuntimeDyld>(&*this->MM)),<br>
State(Raw) {}<br>
<br>
+ // MSVC 2012 cannot infer a move constructor, so write it out longhand.<br>
+ LinkedObjectSet(LinkedObjectSet &&O)<br>
+ : MM(std::move(<a href="http://O.MM" target="_blank">O.MM</a>)), RTDyld(std::move(O.RTDyld)), State(O.State) {}<br>
+<br>
std::unique_ptr<RuntimeDyld::LoadedObjectInfo><br>
addObject(const object::ObjectFile &Obj) {<br>
return RTDyld->loadObject(Obj);<br>
@@ -74,7 +80,7 @@ protected:<br>
<br>
public:<br>
/// @brief Handle to a set of loaded objects.<br>
- typedef typename LinkedObjectSetListT::iterator ObjSetHandleT;<br>
+ typedef LinkedObjectSetListT::iterator ObjSetHandleT;<br>
};<br>
<br>
/// @brief Default (no-op) action to perform when loading objects.<br>
<br>
Modified: llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h?rev=226949&r1=226948&r2=226949&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h?rev=226949&r1=226948&r2=226949&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h Fri Jan 23 16:25:47 2015<br>
@@ -129,7 +129,7 @@ public:<br>
setDataLayout(this->TM->getSubtargetImpl()->getDataLayout());<br>
}<br>
<br>
- void addModule(std::unique_ptr<Module> M) {<br>
+ void addModule(std::unique_ptr<Module> M) override {<br>
<br>
// If this module doesn't have a DataLayout attached then attach the<br>
// default.<br>
@@ -258,7 +258,7 @@ private:<br>
const ObjListT &Objects,<br>
const LoadedObjInfoListT &Infos) const {<br>
M.UnfinalizedSections[H] = std::move(M.SectionsAllocatedSinceLastLoad);<br>
- M.SectionsAllocatedSinceLastLoad = {};<br>
+ M.SectionsAllocatedSinceLastLoad = SectionAddrSet{};<br></blockquote><div><br>MSVC supports braced init in this context/usage? Huh.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
assert(Objects.size() == Infos.size() &&<br>
"Incorrect number of Infos for Objects.");<br>
for (unsigned I = 0; I < Objects.size(); ++I)<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>