summaryrefslogtreecommitdiffstats
path: root/llvm/tools/lli/OrcLazyJIT.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/lli/OrcLazyJIT.cpp')
-rw-r--r--llvm/tools/lli/OrcLazyJIT.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/tools/lli/OrcLazyJIT.cpp b/llvm/tools/lli/OrcLazyJIT.cpp
index f1a752e0790..5624f70e12d 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);
@@ -148,7 +148,7 @@ int llvm::runOrcLazyJIT(std::vector<std::unique_ptr<Module>> Ms,
// Add the module, look up main and run it.
for (auto &M : Ms)
- cantFail(J.addModule(std::shared_ptr<Module>(std::move(M))));
+ cantFail(J.addModule(std::move(M)));
if (auto MainSym = J.findSymbol("main")) {
typedef int (*MainFnPtr)(int, const char*[]);
OpenPOWER on IntegriCloud