summaryrefslogtreecommitdiffstats
path: root/llvm/examples/Kaleidoscope/Chapter5/toy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/examples/Kaleidoscope/Chapter5/toy.cpp')
-rw-r--r--llvm/examples/Kaleidoscope/Chapter5/toy.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/examples/Kaleidoscope/Chapter5/toy.cpp b/llvm/examples/Kaleidoscope/Chapter5/toy.cpp
index 6852973bae4..2d23bdb26c2 100644
--- a/llvm/examples/Kaleidoscope/Chapter5/toy.cpp
+++ b/llvm/examples/Kaleidoscope/Chapter5/toy.cpp
@@ -885,7 +885,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