[Kaleidoscope] Fix incorrect use of reinterpret_cast.
[oota-llvm.git] / examples / Kaleidoscope / MCJIT / lazy / toy.cpp
index fe7fb61969791e6d14ab93ca0f4e0abf7b22999b..14d758cfa79090c1c42fca909cb5c8ed661e8c3b 100644 (file)
@@ -937,7 +937,7 @@ Value *BinaryExprAST::Codegen() {
   // Special case '=' because we don't want to emit the LHS as an expression.
   if (Op == '=') {
     // Assignment requires the LHS to be an identifier.
-    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.