[llvm] r226949 - Fix the MSVC build with the new Orc JIT APIs
Reid Kleckner
reid at kleckner.net
Fri Jan 23 14:25:47 PST 2015
Author: rnk
Date: Fri Jan 23 16:25:47 2015
New Revision: 226949
URL: http://llvm.org/viewvc/llvm-project?rev=226949&view=rev
Log:
Fix the MSVC build with the new Orc JIT APIs
Modified:
llvm/trunk/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h
llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h?rev=226949&r1=226948&r2=226949&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h Fri Jan 23 16:25:47 2015
@@ -32,11 +32,17 @@ protected:
/// had been provided by this instance. Higher level layers are responsible
/// for taking any action required to handle the missing symbols.
class LinkedObjectSet {
+ LinkedObjectSet(const LinkedObjectSet&) LLVM_DELETED_FUNCTION;
+ void operator=(const LinkedObjectSet&) LLVM_DELETED_FUNCTION;
public:
LinkedObjectSet(std::unique_ptr<RTDyldMemoryManager> MM)
: MM(std::move(MM)), RTDyld(llvm::make_unique<RuntimeDyld>(&*this->MM)),
State(Raw) {}
+ // MSVC 2012 cannot infer a move constructor, so write it out longhand.
+ LinkedObjectSet(LinkedObjectSet &&O)
+ : MM(std::move(O.MM)), RTDyld(std::move(O.RTDyld)), State(O.State) {}
+
std::unique_ptr<RuntimeDyld::LoadedObjectInfo>
addObject(const object::ObjectFile &Obj) {
return RTDyld->loadObject(Obj);
@@ -74,7 +80,7 @@ protected:
public:
/// @brief Handle to a set of loaded objects.
- typedef typename LinkedObjectSetListT::iterator ObjSetHandleT;
+ typedef LinkedObjectSetListT::iterator ObjSetHandleT;
};
/// @brief Default (no-op) action to perform when loading objects.
Modified: llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h?rev=226949&r1=226948&r2=226949&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h (original)
+++ llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h Fri Jan 23 16:25:47 2015
@@ -129,7 +129,7 @@ public:
setDataLayout(this->TM->getSubtargetImpl()->getDataLayout());
}
- void addModule(std::unique_ptr<Module> M) {
+ void addModule(std::unique_ptr<Module> M) override {
// If this module doesn't have a DataLayout attached then attach the
// default.
@@ -258,7 +258,7 @@ private:
const ObjListT &Objects,
const LoadedObjInfoListT &Infos) const {
M.UnfinalizedSections[H] = std::move(M.SectionsAllocatedSinceLastLoad);
- M.SectionsAllocatedSinceLastLoad = {};
+ M.SectionsAllocatedSinceLastLoad = SectionAddrSet{};
assert(Objects.size() == Infos.size() &&
"Incorrect number of Infos for Objects.");
for (unsigned I = 0; I < Objects.size(); ++I)
More information about the llvm-commits
mailing list