if (!M->getDataLayout())
M->setDataLayout(getDataLayout());
- OwnedModules.push_back(std::move(M));
+ Modules.push_back(std::move(M));
std::vector<Module *> Ms;
- Ms.push_back(&*OwnedModules.back());
+ Ms.push_back(&*Modules.back());
LazyEmitLayer.addModuleSet(std::move(Ms),
llvm::make_unique<ForwardingRTDyldMM>(*this));
}
CompileLayerT CompileLayer;
LazyEmitLayerT LazyEmitLayer;
- // MCJIT keeps modules alive - we need to do the same for backwards
- // compatibility.
- std::vector<std::unique_ptr<Module>> OwnedModules;
-
// We need to store ObjLayerT::ObjSetHandles for each of the object sets
// that have been emitted but not yet finalized so that we can forward the
// mapSectionAddress calls appropriately.