[llvm-commits] CVS: llvm/lib/Transforms/ExprTypeConvert.cpp
Reid Spencer
reid at x10sys.com
Mon Dec 18 00:16:44 PST 2006
Changes in directory llvm/lib/Transforms:
ExprTypeConvert.cpp updated: 1.115 -> 1.116
---
Log message:
Convert the last use of two-argument ConstantExpr::getCast into another
form so we can remove that method from ConstantExpr.
---
Diffs of the changes: (+3 -1)
ExprTypeConvert.cpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
Index: llvm/lib/Transforms/ExprTypeConvert.cpp
diff -u llvm/lib/Transforms/ExprTypeConvert.cpp:1.115 llvm/lib/Transforms/ExprTypeConvert.cpp:1.116
--- llvm/lib/Transforms/ExprTypeConvert.cpp:1.115 Wed Dec 6 19:30:31 2006
+++ llvm/lib/Transforms/ExprTypeConvert.cpp Mon Dec 18 02:16:27 2006
@@ -210,7 +210,9 @@
Constant *CPV = cast<Constant>(V);
// Constants are converted by constant folding the cast that is required.
// We assume here that all casts are implemented for constant prop.
- Value *Result = ConstantExpr::getCast(CPV, Ty);
+ Instruction::CastOps opcode = CastInst::getCastOpcode(CPV,
+ CPV->getType()->isSigned(), Ty, Ty->isSigned());
+ Value *Result = ConstantExpr::getCast(opcode, CPV, Ty);
// Add the instruction to the expression map
//VMC.ExprMap[V] = Result;
return Result;
More information about the llvm-commits
mailing list