[Kaleidoscope] Fix incorrect use of reinterpret_cast.
[oota-llvm.git] / examples / Kaleidoscope / Chapter8 / toy.cpp
index 6ab0eaeca30ea647a63e09d74baf218d4d6864e7..a565e52e2eb414c898c7b1b02a0a42239905c56a 100644 (file)
@@ -911,7 +911,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.
-    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.