summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-02-27 23:27:26 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-02-27 23:27:26 +0000
commit3370b04a66ed47272c43a62893cf3a402043758c (patch)
tree7d908a0a2d22822172a662b9cb015b5eaa3f8e73 /llvm/lib
parentee8aca0cfaded71d407e3f21599bc0e6b6e2a8c8 (diff)
downloadbcm5719-llvm-3370b04a66ed47272c43a62893cf3a402043758c.tar.gz
bcm5719-llvm-3370b04a66ed47272c43a62893cf3a402043758c.zip
Remove some redundancy.
llvm-svn: 34702
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/VMCore/Constants.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp
index 0c507964331..37e0abec988 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<IntegerType>(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;
}
OpenPOWER on IntegriCloud