1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00

[Kaleidoscope] Fix incorrect use of reinterpret_cast.

Thanks to Dave Blaikie for catching this.

llvm-svn: 235543
This commit is contained in:
Lang Hames 2015-04-22 20:58:34 +00:00
parent d3a6227279
commit d30cf57acb
7 changed files with 7 additions and 7 deletions

View 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.
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.

View 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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View 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.