From 3370b04a66ed47272c43a62893cf3a402043758c Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Tue, 27 Feb 2007 23:27:26 +0000 Subject: [PATCH] Remove some redundancy. llvm-svn: 34702 --- llvm/lib/VMCore/Constants.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp index 0c5079643310..37e0abec9887 100644 --- a/llvm/lib/VMCore/Constants.cpp +++ b/llvm/lib/VMCore/Constants.cpp @@ -115,10 +115,7 @@ Constant *Constant::getNullValue(const Type *Ty) { // Static constructor to create an integral constant with all bits set ConstantInt *ConstantInt::getAllOnesValue(const Type *Ty) { if (const IntegerType* ITy = dyn_cast(Ty)) - if (ITy->getBitWidth() == 1) - return ConstantInt::getTrue(); - else - return ConstantInt::get(Ty, APInt::getAllOnesValue(ITy->getBitWidth())); + return ConstantInt::get(Ty, APInt::getAllOnesValue(ITy->getBitWidth())); return 0; }