summaryrefslogtreecommitdiffstats
path: root/llvm/examples/Kaleidoscope/Chapter4/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
commit4ce98662e7d109b4579c35945345db685ae5b3fb (patch)
tree4538ca3c0131f3275286aac4347bf712ed0068e7 /llvm/examples/Kaleidoscope/Chapter4/toy.cpp
parentb909f11a319ae62e683d1f9d82e28a05b360b8ae (diff)
downloadbcm5719-llvm-4ce98662e7d109b4579c35945345db685ae5b3fb.tar.gz
bcm5719-llvm-4ce98662e7d109b4579c35945345db685ae5b3fb.zip
[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. llvm-svn: 307350
Diffstat (limited to 'llvm/examples/Kaleidoscope/Chapter4/toy.cpp')
-rw-r--r--llvm/examples/Kaleidoscope/Chapter4/toy.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/examples/Kaleidoscope/Chapter4/toy.cpp b/llvm/examples/Kaleidoscope/Chapter4/toy.cpp
index cf7d6c2bee0..921fa890804 100644
--- a/llvm/examples/Kaleidoscope/Chapter4/toy.cpp
+++ b/llvm/examples/Kaleidoscope/Chapter4/toy.cpp
@@ -611,7 +611,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.
OpenPOWER on IntegriCloud