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 | a32764453444da90e92ba0041f40b4d94fadf2d4 (patch) | |
| tree | 232dbf2925f93f9cf1835e7ad8464c64eb3ad028 /llvm/examples/Kaleidoscope | |
| parent | 60dea16af4c4799bade66d7a71d573a4a3a9e40c (diff) | |
| download | bcm5719-llvm-a32764453444da90e92ba0041f40b4d94fadf2d4.tar.gz bcm5719-llvm-a32764453444da90e92ba0041f40b4d94fadf2d4.zip | |
[Kaleidoscope] Fix incorrect use of reinterpret_cast.
Thanks to Dave Blaikie for catching this.
llvm-svn: 235543
Diffstat (limited to 'llvm/examples/Kaleidoscope')
| -rw-r--r-- | llvm/examples/Kaleidoscope/Chapter7/toy.cpp | 2 | ||||
| -rw-r--r-- | llvm/examples/Kaleidoscope/Chapter8/toy.cpp | 2 | ||||
| -rw-r--r-- | llvm/examples/Kaleidoscope/MCJIT/cached/toy-jit.cpp | 2 | ||||
| -rw-r--r-- | llvm/examples/Kaleidoscope/MCJIT/cached/toy.cpp | 2 | ||||
| -rw-r--r-- | llvm/examples/Kaleidoscope/MCJIT/complete/toy.cpp | 2 | ||||
| -rw-r--r-- | llvm/examples/Kaleidoscope/MCJIT/initial/toy.cpp | 2 | ||||
| -rw-r--r-- | llvm/examples/Kaleidoscope/MCJIT/lazy/toy.cpp | 2 |
7 files changed, 7 insertions, 7 deletions
diff --git a/llvm/examples/Kaleidoscope/Chapter7/toy.cpp b/llvm/examples/Kaleidoscope/Chapter7/toy.cpp index acf21f898f8..b1a41fa01b7 100644 --- a/llvm/examples/Kaleidoscope/Chapter7/toy.cpp +++ b/llvm/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/llvm/examples/Kaleidoscope/Chapter8/toy.cpp b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp index 6ab0eaeca30..a565e52e2eb 100644 --- a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp +++ b/llvm/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/llvm/examples/Kaleidoscope/MCJIT/cached/toy-jit.cpp b/llvm/examples/Kaleidoscope/MCJIT/cached/toy-jit.cpp index 7f5ed137cec..77b7f001095 100644 --- a/llvm/examples/Kaleidoscope/MCJIT/cached/toy-jit.cpp +++ b/llvm/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/llvm/examples/Kaleidoscope/MCJIT/cached/toy.cpp b/llvm/examples/Kaleidoscope/MCJIT/cached/toy.cpp index f598ca41f0f..cc12abcc431 100644 --- a/llvm/examples/Kaleidoscope/MCJIT/cached/toy.cpp +++ b/llvm/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/llvm/examples/Kaleidoscope/MCJIT/complete/toy.cpp b/llvm/examples/Kaleidoscope/MCJIT/complete/toy.cpp index 5294bb71ee1..c78ec35fa0b 100644 --- a/llvm/examples/Kaleidoscope/MCJIT/complete/toy.cpp +++ b/llvm/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/llvm/examples/Kaleidoscope/MCJIT/initial/toy.cpp b/llvm/examples/Kaleidoscope/MCJIT/initial/toy.cpp index dd35358753d..9455946087d 100644 --- a/llvm/examples/Kaleidoscope/MCJIT/initial/toy.cpp +++ b/llvm/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/llvm/examples/Kaleidoscope/MCJIT/lazy/toy.cpp b/llvm/examples/Kaleidoscope/MCJIT/lazy/toy.cpp index fe7fb619697..14d758cfa79 100644 --- a/llvm/examples/Kaleidoscope/MCJIT/lazy/toy.cpp +++ b/llvm/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. |

