diff options
| author | Chris Lattner <sabre@nondot.org> | 2003-05-14 17:50:19 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2003-05-14 17:50:19 +0000 |
| commit | c009d58eb33995cff7808dce71b60bbcff46e2ce (patch) | |
| tree | 1fbd2b6d4249884817a65332c1ebce7f0edd21eb /llvm/lib | |
| parent | f2bef422e481b890feb1dd6f6b37d7dc96dc7a83 (diff) | |
| download | bcm5719-llvm-c009d58eb33995cff7808dce71b60bbcff46e2ce.tar.gz bcm5719-llvm-c009d58eb33995cff7808dce71b60bbcff46e2ce.zip | |
Casts are now unnecessary
llvm-svn: 6199
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CWriter/Writer.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/CWriter/Writer.cpp b/llvm/lib/CWriter/Writer.cpp index 195a4f71ec6..577054e245c 100644 --- a/llvm/lib/CWriter/Writer.cpp +++ b/llvm/lib/CWriter/Writer.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; |

