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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32470 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-12-12 05:14:13 +00:00
parent 4da49122f3
commit cb0a681989

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);