llvm.org GIT mirror llvm / d09c631
Fix the MSVC build with the new Orc JIT APIs git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226949 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Kleckner 5 years ago
2 changed file(s) with 9 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
3131 /// had been provided by this instance. Higher level layers are responsible
3232 /// for taking any action required to handle the missing symbols.
3333 class LinkedObjectSet {
34 LinkedObjectSet(const LinkedObjectSet&) LLVM_DELETED_FUNCTION;
35 void operator=(const LinkedObjectSet&) LLVM_DELETED_FUNCTION;
3436 public:
3537 LinkedObjectSet(std::unique_ptr MM)
3638 : MM(std::move(MM)), RTDyld(llvm::make_unique(&*this->MM)),
3739 State(Raw) {}
40
41 // MSVC 2012 cannot infer a move constructor, so write it out longhand.
42 LinkedObjectSet(LinkedObjectSet &&O)
43 : MM(std::move(O.MM)), RTDyld(std::move(O.RTDyld)), State(O.State) {}
3844
3945 std::unique_ptr
4046 addObject(const object::ObjectFile &Obj) {
7379
7480 public:
7581 /// @brief Handle to a set of loaded objects.
76 typedef typename LinkedObjectSetListT::iterator ObjSetHandleT;
82 typedef LinkedObjectSetListT::iterator ObjSetHandleT;
7783 };
7884
7985 /// @brief Default (no-op) action to perform when loading objects.
128128 setDataLayout(this->TM->getSubtargetImpl()->getDataLayout());
129129 }
130130
131 void addModule(std::unique_ptr M) {
131 void addModule(std::unique_ptr M) override {
132132
133133 // If this module doesn't have a DataLayout attached then attach the
134134 // default.
257257 const ObjListT &Objects,
258258 const LoadedObjInfoListT &Infos) const {
259259 M.UnfinalizedSections[H] = std::move(M.SectionsAllocatedSinceLastLoad);
260 M.SectionsAllocatedSinceLastLoad = {};
260 M.SectionsAllocatedSinceLastLoad = SectionAddrSet{};
261261 assert(Objects.size() == Infos.size() &&
262262 "Incorrect number of Infos for Objects.");
263263 for (unsigned I = 0; I < Objects.size(); ++I)