mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-14 15:28:20 +00:00
Casts are now unnecessary
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6199 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -344,28 +344,28 @@ void CWriter::printConstant(Constant *CPV) {
|
|||||||
Out << "((";
|
Out << "((";
|
||||||
printType(Out, CPV->getType());
|
printType(Out, CPV->getType());
|
||||||
Out << ")";
|
Out << ")";
|
||||||
printConstant(cast<Constant>(CPV->getOperand(0)));
|
printConstant(CE->getOperand(0));
|
||||||
Out << ")";
|
Out << ")";
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Instruction::GetElementPtr:
|
case Instruction::GetElementPtr:
|
||||||
Out << "(&(";
|
Out << "(&(";
|
||||||
printIndexingExpression(CPV->getOperand(0),
|
printIndexingExpression(CE->getOperand(0),
|
||||||
CPV->op_begin()+1, CPV->op_end());
|
CPV->op_begin()+1, CPV->op_end());
|
||||||
Out << "))";
|
Out << "))";
|
||||||
return;
|
return;
|
||||||
case Instruction::Add:
|
case Instruction::Add:
|
||||||
Out << "(";
|
Out << "(";
|
||||||
printConstant(cast<Constant>(CPV->getOperand(0)));
|
printConstant(CE->getOperand(0));
|
||||||
Out << " + ";
|
Out << " + ";
|
||||||
printConstant(cast<Constant>(CPV->getOperand(1)));
|
printConstant(CE->getOperand(1));
|
||||||
Out << ")";
|
Out << ")";
|
||||||
return;
|
return;
|
||||||
case Instruction::Sub:
|
case Instruction::Sub:
|
||||||
Out << "(";
|
Out << "(";
|
||||||
printConstant(cast<Constant>(CPV->getOperand(0)));
|
printConstant(CE->getOperand(0));
|
||||||
Out << " - ";
|
Out << " - ";
|
||||||
printConstant(cast<Constant>(CPV->getOperand(1)));
|
printConstant(CE->getOperand(1));
|
||||||
Out << ")";
|
Out << ")";
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@@ -344,28 +344,28 @@ void CWriter::printConstant(Constant *CPV) {
|
|||||||
Out << "((";
|
Out << "((";
|
||||||
printType(Out, CPV->getType());
|
printType(Out, CPV->getType());
|
||||||
Out << ")";
|
Out << ")";
|
||||||
printConstant(cast<Constant>(CPV->getOperand(0)));
|
printConstant(CE->getOperand(0));
|
||||||
Out << ")";
|
Out << ")";
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Instruction::GetElementPtr:
|
case Instruction::GetElementPtr:
|
||||||
Out << "(&(";
|
Out << "(&(";
|
||||||
printIndexingExpression(CPV->getOperand(0),
|
printIndexingExpression(CE->getOperand(0),
|
||||||
CPV->op_begin()+1, CPV->op_end());
|
CPV->op_begin()+1, CPV->op_end());
|
||||||
Out << "))";
|
Out << "))";
|
||||||
return;
|
return;
|
||||||
case Instruction::Add:
|
case Instruction::Add:
|
||||||
Out << "(";
|
Out << "(";
|
||||||
printConstant(cast<Constant>(CPV->getOperand(0)));
|
printConstant(CE->getOperand(0));
|
||||||
Out << " + ";
|
Out << " + ";
|
||||||
printConstant(cast<Constant>(CPV->getOperand(1)));
|
printConstant(CE->getOperand(1));
|
||||||
Out << ")";
|
Out << ")";
|
||||||
return;
|
return;
|
||||||
case Instruction::Sub:
|
case Instruction::Sub:
|
||||||
Out << "(";
|
Out << "(";
|
||||||
printConstant(cast<Constant>(CPV->getOperand(0)));
|
printConstant(CE->getOperand(0));
|
||||||
Out << " - ";
|
Out << " - ";
|
||||||
printConstant(cast<Constant>(CPV->getOperand(1)));
|
printConstant(CE->getOperand(1));
|
||||||
Out << ")";
|
Out << ")";
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user