Casts are now unnecessary
llvm-svn: 6199
This commit is contained in:
1 parent
f2bef422e4
commit
c009d58eb3
1 file changed
+6
-6
@@ -344,28 +344,28 @@ void CWriter::printConstant(Constant *CPV) {
|
||||
Out << "((";
|
||||
printType(Out, CPV->getType());
|
||||
Out << ")";
|
||||
printConstant(cast<Constant>(CPV->getOperand(0)));
|
||||
printConstant(CE->getOperand(0));
|
||||
Out << ")";
|
||||
return;
|
||||
|
||||
case Instruction::GetElementPtr:
|
||||
Out << "(&(";
|
||||
printIndexingExpression(CPV->getOperand(0),
|
||||
printIndexingExpression(CE->getOperand(0),
|
||||
CPV->op_begin()+1, CPV->op_end());
|
||||
Out << "))";
|
||||
return;
|
||||
case Instruction::Add:
|
||||
Out << "(";
|
||||
printConstant(cast<Constant>(CPV->getOperand(0)));
|
||||
printConstant(CE->getOperand(0));
|
||||
Out << " + ";
|
||||
printConstant(cast<Constant>(CPV->getOperand(1)));
|
||||
printConstant(CE->getOperand(1));
|
||||
Out << ")";
|
||||
return;
|
||||
case Instruction::Sub:
|
||||
Out << "(";
|
||||
printConstant(cast<Constant>(CPV->getOperand(0)));
|
||||
printConstant(CE->getOperand(0));
|
||||
Out << " - ";
|
||||
printConstant(cast<Constant>(CPV->getOperand(1)));
|
||||
printConstant(CE->getOperand(1));
|
||||
Out << ")";
|
||||
return;
|
||||
|
||||
|
||||
Reference in new issue
Block a user