[Kaleidoscope] Fix incorrect use of reinterpret_cast.
[oota-llvm.git] / examples / Kaleidoscope / Chapter7 / toy.cpp
index acf21f898f83ede74764b42dc13fac6a9378ef97..b1a41fa01b76b7c3276ea83877beb7da34a27ad7 100644 (file)
@@ -716,7 +716,7 @@ Value *BinaryExprAST::Codegen() {
     // This assume we're building without RTTI because LLVM builds that way by
     // default.  If you build LLVM with RTTI this can be changed to a
     // dynamic_cast for automatic error checking.
     // This assume we're building without RTTI because LLVM builds that way by
     // default.  If you build LLVM with RTTI this can be changed to a
     // dynamic_cast for automatic error checking.
-    VariableExprAST *LHSE = reinterpret_cast<VariableExprAST *>(LHS);
+    VariableExprAST *LHSE = static_cast<VariableExprAST *>(LHS);
     if (!LHSE)
       return ErrorV("destination of '=' must be a variable");
     // Codegen the RHS.
     if (!LHSE)
       return ErrorV("destination of '=' must be a variable");
     // Codegen the RHS.