summaryrefslogtreecommitdiff
path: root/examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp
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/Chapter2/toy.cpp
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/Chapter2/toy.cpp')
-rw-r--r--examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp b/examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp
index 163caa6872d..2471344c6d6 100644
--- a/examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp
+++ b/examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp
@@ -1150,7 +1150,7 @@ static void HandleTopLevelExpression() {
// Get the symbol's address and cast it to the right type (takes no
// arguments, returns a double) so we can call it as a native function.
- double (*FP)() = (double (*)())(intptr_t)ExprSymbol.getAddress();
+ double (*FP)() = (double (*)())(intptr_t)cantFail(ExprSymbol.getAddress());
fprintf(stderr, "Evaluated to %f\n", FP());
// Delete the anonymous expression module from the JIT.