From 69b9e892b61c0b69bbdb0bcf1e295cf10e78e5a7 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 12 Jan 2004 19:12:58 +0000 Subject: [PATCH] Fix out of date comment, remove use of ConstantExpr::getShift git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10794 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/Constants.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index e796bad8360..0e30c3ee587 100644 --- a/lib/VMCore/Constants.cpp +++ b/lib/VMCore/Constants.cpp @@ -501,13 +501,6 @@ void ConstantExpr::replaceUsesOfWithOnConstant(Value *From, Value *ToV, } else if (getOpcode() == Instruction::Cast) { assert(getOperand(0) == From && "Cast only has one use!"); Replacement = ConstantExpr::getCast(To, getType()); - } else if (getOpcode() == Instruction::Shl || - getOpcode() == Instruction::Shr) { - Constant *C1 = getOperand(0); - Constant *C2 = getOperand(1); - if (C1 == From) C1 = To; - if (C2 == From) C2 = To; - Replacement = ConstantExpr::getShift(getOpcode(), C1, C2); } else if (getNumOperands() == 2) { Constant *C1 = getOperand(0); Constant *C2 = getOperand(1); @@ -958,7 +951,7 @@ Constant *ConstantExpr::getTy(const Type *ReqTy, unsigned Opcode, return ExprConstants.getOrCreate(ReqTy, Key); } -/// getShift - Return a shift left or shift right constant expr +/// getShiftTy - Return a shift left or shift right constant expr Constant *ConstantExpr::getShiftTy(const Type *ReqTy, unsigned Opcode, Constant *C1, Constant *C2) { // Check the operands for consistency first -- 2.34.1