summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2015-02-02 04:34:02 +0000
committerLang Hames <lhames@gmail.com>2015-02-02 04:34:02 +0000
commita3e710dddd6b0af3f59f00f06af122e0accf24e0 (patch)
tree6c6d099768e3471b6e9fddd766d674f2944710fb /llvm/lib/ExecutionEngine
parent29dff9837af24e05e1424bd4d803d907e07aa25b (diff)
downloadbcm5719-llvm-a3e710dddd6b0af3f59f00f06af122e0accf24e0.tar.gz
bcm5719-llvm-a3e710dddd6b0af3f59f00f06af122e0accf24e0.zip
[Orc] Remove the OwnedModules list from OrcMCJITReplacement and use
ExecutionEngine's Modules list instead. This makes the owned modules visibile to ExecutionEngine. In particular, it is required for ExecutionEngine::runStaticConstructorsAndDestructors to work. Regression tests for Orc (which test this issue) will be committed shortly. llvm-svn: 227779
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r--llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h b/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h
index 158d9c785e2..838f5dce97f 100644
--- a/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h
+++ b/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h
@@ -134,9 +134,9 @@ public:
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));
}
@@ -302,10 +302,6 @@ private:
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.
OpenPOWER on IntegriCloud