summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-12-12 05:14:13 +0000
committerChris Lattner <sabre@nondot.org>2006-12-12 05:14:13 +0000
commitcb0a6819895bf5e357a205b72f0a6fce90025f21 (patch)
treeb3bd98552caabe33aa2108de184d1ee3cddd1f2c /lib/CodeGen/AsmPrinter.cpp
parent4da49122f3f3c8da68a52723d846b88c72166a68 (diff)
downloadllvm-cb0a6819895bf5e357a205b72f0a6fce90025f21.tar.gz
llvm-cb0a6819895bf5e357a205b72f0a6fce90025f21.tar.bz2
llvm-cb0a6819895bf5e357a205b72f0a6fce90025f21.tar.xz
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
Diffstat (limited to 'lib/CodeGen/AsmPrinter.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp
index a9e94a01f7..db70e2d614 100644
--- a/lib/CodeGen/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter.cpp
@@ -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);