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:
parent
d3a6227279
commit
d30cf57acb
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user