the operand of a bitcast is always the right size, just emit it in place.

llvm-svn: 32470
This commit is contained in:
Chris Lattner 2006-12-12 05:14:13 +00:00
parent b341b0861d
commit b9e41f5559
1 changed files with 4 additions and 2 deletions

View File

@ -434,9 +434,11 @@ void AsmPrinter::EmitConstantValueOnly(const Constant *CV) {
case Instruction::FPToSI:
assert(0 && "FIXME: Don't yet support this kind of constant cast expr");
break;
case Instruction::BitCast:
return EmitConstantValueOnly(CE->getOperand(0));
case Instruction::IntToPtr:
case Instruction::PtrToInt:
case Instruction::BitCast: {
case Instruction::PtrToInt:{
// Support only foldable casts to/from pointers that can be eliminated by
// changing the pointer to the appropriately sized integer type.
Constant *Op = CE->getOperand(0);