diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2017-06-23 22:50:24 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2017-06-23 22:50:24 +0000 |
| commit | f6242c3e90023baf746bca765f843e6c7f0d5660 (patch) | |
| tree | 68ff7605825d9edd3a72d660f563e7ce22c90be0 /llvm/tools/lli/OrcLazyJIT.cpp | |
| parent | 33d501f7d13c5d321ad3fce99b8e1c91becde075 (diff) | |
| download | bcm5719-llvm-f6242c3e90023baf746bca765f843e6c7f0d5660.tar.gz bcm5719-llvm-f6242c3e90023baf746bca765f843e6c7f0d5660.zip | |
This reverts commit r306166 and r306168.
Revert "[ORC] Remove redundant semicolons from DEFINE_SIMPLE_CONVERSION_FUNCTIONS uses."
Revert "[ORC] Move ORC IR layer interface from addModuleSet to addModule and fix the module type as std::shared_ptr<Module>."
They broke ExecutionEngine/OrcMCJIT/test-global-ctors.ll on linux.
llvm-svn: 306176
Diffstat (limited to 'llvm/tools/lli/OrcLazyJIT.cpp')
| -rw-r--r-- | llvm/tools/lli/OrcLazyJIT.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/tools/lli/OrcLazyJIT.cpp b/llvm/tools/lli/OrcLazyJIT.cpp index 2e15894152f..899a7acdb1c 100644 --- a/llvm/tools/lli/OrcLazyJIT.cpp +++ b/llvm/tools/lli/OrcLazyJIT.cpp @@ -54,10 +54,10 @@ static cl::opt<bool> OrcInlineStubs("orc-lazy-inline-stubs", OrcLazyJIT::TransformFtor OrcLazyJIT::createDebugDumper() { switch (OrcDumpKind) { case DumpKind::NoDump: - return [](std::shared_ptr<Module> M) { return M; }; + return [](std::unique_ptr<Module> M) { return M; }; case DumpKind::DumpFuncsToStdOut: - return [](std::shared_ptr<Module> M) { + return [](std::unique_ptr<Module> M) { printf("[ "); for (const auto &F : *M) { @@ -76,7 +76,7 @@ OrcLazyJIT::TransformFtor OrcLazyJIT::createDebugDumper() { }; case DumpKind::DumpModsToStdOut: - return [](std::shared_ptr<Module> M) { + return [](std::unique_ptr<Module> M) { outs() << "----- Module Start -----\n" << *M << "----- Module End -----\n"; @@ -84,7 +84,7 @@ OrcLazyJIT::TransformFtor OrcLazyJIT::createDebugDumper() { }; case DumpKind::DumpModsToDisk: - return [](std::shared_ptr<Module> M) { + return [](std::unique_ptr<Module> M) { std::error_code EC; raw_fd_ostream Out(M->getModuleIdentifier() + ".ll", EC, sys::fs::F_Text); @@ -147,8 +147,7 @@ int llvm::runOrcLazyJIT(std::vector<std::unique_ptr<Module>> Ms, OrcInlineStubs); // Add the module, look up main and run it. - for (auto &M : Ms) - J.addModule(std::shared_ptr<Module>(std::move(M))); + J.addModuleSet(std::move(Ms)); auto MainSym = J.findSymbol("main"); if (!MainSym) { |

