diff options
| author | Reid Spencer <rspencer@reidspencer.com> | 2006-12-18 08:16:27 +0000 | 
|---|---|---|
| committer | Reid Spencer <rspencer@reidspencer.com> | 2006-12-18 08:16:27 +0000 | 
| commit | b83593e3eae45216cc741c9818285786017765bc (patch) | |
| tree | e8a1b4d4937a5f5a327f64be9780e4032462cc2a /llvm/lib/Transforms | |
| parent | cf0c82f5faa683c1e73ac3ed74622faef949f824 (diff) | |
| download | bcm5719-llvm-b83593e3eae45216cc741c9818285786017765bc.tar.gz bcm5719-llvm-b83593e3eae45216cc741c9818285786017765bc.zip | |
Convert the last use of two-argument ConstantExpr::getCast into another
form so we can remove that method from ConstantExpr.
llvm-svn: 32652
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/ExprTypeConvert.cpp | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/llvm/lib/Transforms/ExprTypeConvert.cpp b/llvm/lib/Transforms/ExprTypeConvert.cpp index 1ce6eedbee3..814318a587e 100644 --- a/llvm/lib/Transforms/ExprTypeConvert.cpp +++ b/llvm/lib/Transforms/ExprTypeConvert.cpp @@ -210,7 +210,9 @@ Value *llvm::ConvertExpressionToType(Value *V, const Type *Ty,      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; | 

