summaryrefslogtreecommitdiff
path: root/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2017-07-07 02:59:13 +0000
committerLang Hames <lhames@gmail.com>2017-07-07 02:59:13 +0000
commita81793582b3c47869680d354a97d59c55779c349 (patch)
tree8ed2414162602044dc62e2ec3a92ba70b84e9999 /examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h
parentd0585d352f3269c2f8ccbcc44192c3ab3de4dbf5 (diff)
[ORC] Errorize the ORC APIs.
This patch updates the ORC layers and utilities to return and propagate llvm::Errors where appropriate. This is necessary to allow ORC to safely handle error cases in cross-process and remote JITing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307350 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h')
-rw-r--r--examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h b/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h
index 5ce8c9f152a..5a2148a14a1 100644
--- a/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h
+++ b/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h
@@ -75,8 +75,8 @@ public:
// Add the set to the JIT with the resolver we created above and a newly
// created SectionMemoryManager.
- return CompileLayer.addModule(std::move(M),
- std::move(Resolver));
+ return cantFail(CompileLayer.addModule(std::move(M),
+ std::move(Resolver)));
}
JITSymbol findSymbol(const std::string Name) {
@@ -87,7 +87,7 @@ public:
}
void removeModule(ModuleHandle H) {
- CompileLayer.removeModule(H);
+ cantFail(CompileLayer.removeModule(H));
}
};