[llvm-commits] CVS: llvm/lib/CWriter/Writer.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed May 14 12:51:51 PDT 2003
Changes in directory llvm/lib/CWriter:
Writer.cpp updated: 1.86 -> 1.87
---
Log message:
Casts are now unnecessary
---
Diffs of the changes:
Index: llvm/lib/CWriter/Writer.cpp
diff -u llvm/lib/CWriter/Writer.cpp:1.86 llvm/lib/CWriter/Writer.cpp:1.87
--- llvm/lib/CWriter/Writer.cpp:1.86 Tue May 13 15:15:37 2003
+++ llvm/lib/CWriter/Writer.cpp Wed May 14 12:50:19 2003
@@ -344,28 +344,28 @@
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;
More information about the llvm-commits
mailing list