aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/CBackend/CBackend.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-05-14 17:50:19 +0000
committerChris Lattner <sabre@nondot.org>2003-05-14 17:50:19 +0000
commit84c0d5e157bafe1af1d702068e645e287b7bfc29 (patch)
tree9b9c6013a4472b90aa07477989690f99ff79a8da /lib/Target/CBackend/CBackend.cpp
parent17aefb168fb2cfffcbd7131d1529a90ae1831b1c (diff)
Casts are now unnecessary
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6199 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CBackend/CBackend.cpp')
-rw-r--r--lib/Target/CBackend/CBackend.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp
index 195a4f71ec..577054e245 100644
--- a/lib/Target/CBackend/CBackend.cpp
+++ b/lib/Target/CBackend/CBackend.cpp
@@ -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;