summaryrefslogtreecommitdiff
path: root/examples/Kaleidoscope/BuildingAJIT/Chapter4/toy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/Kaleidoscope/BuildingAJIT/Chapter4/toy.cpp')
-rw-r--r--examples/Kaleidoscope/BuildingAJIT/Chapter4/toy.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/Kaleidoscope/BuildingAJIT/Chapter4/toy.cpp b/examples/Kaleidoscope/BuildingAJIT/Chapter4/toy.cpp
index ff4b5220105be..ed8ae31ba0fd4 100644
--- a/examples/Kaleidoscope/BuildingAJIT/Chapter4/toy.cpp
+++ b/examples/Kaleidoscope/BuildingAJIT/Chapter4/toy.cpp
@@ -1153,7 +1153,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.