diff options
author | Lang Hames <lhames@gmail.com> | 2015-04-22 20:58:34 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2015-04-22 20:58:34 +0000 |
commit | 62682bceb3a3291e26bb5958a5efa7a2c8b411c7 (patch) | |
tree | 7ca264c5e4e12b5aaae2109d1e7c84d8404311f4 | |
parent | f52e2f3ef5b492f8f9439f45737e3a5a78d9b5d9 (diff) |
[Kaleidoscope] Fix incorrect use of reinterpret_cast.
Thanks to Dave Blaikie for catching this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235543 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | examples/Kaleidoscope/Chapter7/toy.cpp | 2 | ||||
-rw-r--r-- | examples/Kaleidoscope/Chapter8/toy.cpp | 2 | ||||
-rw-r--r-- | examples/Kaleidoscope/MCJIT/cached/toy-jit.cpp | 2 | ||||
-rw-r--r-- | examples/Kaleidoscope/MCJIT/cached/toy.cpp | 2 | ||||
-rw-r--r-- | examples/Kaleidoscope/MCJIT/complete/toy.cpp | 2 | ||||
-rw-r--r-- | examples/Kaleidoscope/MCJIT/initial/toy.cpp | 2 | ||||
-rw-r--r-- | examples/Kaleidoscope/MCJIT/lazy/toy.cpp | 2 |
7 files changed, 7 insertions, 7 deletions
diff --git a/examples/Kaleidoscope/Chapter7/toy.cpp b/examples/Kaleidoscope/Chapter7/toy.cpp index acf21f898f..b1a41fa01b 100644 --- a/examples/Kaleidoscope/Chapter7/toy.cpp +++ b/examples/Kaleidoscope/Chapter7/toy.cpp @@ -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. - 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. diff --git a/examples/Kaleidoscope/Chapter8/toy.cpp b/examples/Kaleidoscope/Chapter8/toy.cpp index 6ab0eaeca3..a565e52e2e 100644 --- a/examples/Kaleidoscope/Chapter8/toy.cpp +++ b/examples/Kaleidoscope/Chapter8/toy.cpp @@ -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. diff --git a/examples/Kaleidoscope/MCJIT/cached/toy-jit.cpp b/examples/Kaleidoscope/MCJIT/cached/toy-jit.cpp index 7f5ed137ce..77b7f00109 100644 --- a/examples/Kaleidoscope/MCJIT/cached/toy-jit.cpp +++ b/examples/Kaleidoscope/MCJIT/cached/toy-jit.cpp @@ -672,7 +672,7 @@ Value *BinaryExprAST::Codegen() { // For now, I'm building without RTTI because LLVM builds that way by // default and so we need to build that way to use the command line supprt. // If you build LLVM with RTTI this can be changed back to a dynamic_cast. - 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. diff --git a/examples/Kaleidoscope/MCJIT/cached/toy.cpp b/examples/Kaleidoscope/MCJIT/cached/toy.cpp index f598ca41f0..cc12abcc43 100644 --- a/examples/Kaleidoscope/MCJIT/cached/toy.cpp +++ b/examples/Kaleidoscope/MCJIT/cached/toy.cpp @@ -1039,7 +1039,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. diff --git a/examples/Kaleidoscope/MCJIT/complete/toy.cpp b/examples/Kaleidoscope/MCJIT/complete/toy.cpp index 5294bb71ee..c78ec35fa0 100644 --- a/examples/Kaleidoscope/MCJIT/complete/toy.cpp +++ b/examples/Kaleidoscope/MCJIT/complete/toy.cpp @@ -1113,7 +1113,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. diff --git a/examples/Kaleidoscope/MCJIT/initial/toy.cpp b/examples/Kaleidoscope/MCJIT/initial/toy.cpp index dd35358753..9455946087 100644 --- a/examples/Kaleidoscope/MCJIT/initial/toy.cpp +++ b/examples/Kaleidoscope/MCJIT/initial/toy.cpp @@ -897,7 +897,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. diff --git a/examples/Kaleidoscope/MCJIT/lazy/toy.cpp b/examples/Kaleidoscope/MCJIT/lazy/toy.cpp index fe7fb61969..14d758cfa7 100644 --- a/examples/Kaleidoscope/MCJIT/lazy/toy.cpp +++ b/examples/Kaleidoscope/MCJIT/lazy/toy.cpp @@ -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. |