diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-02-27 23:27:26 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-02-27 23:27:26 +0000 |
commit | 80f8481ef0ecbe52ce9b6f17bdcf412438c2f14e (patch) | |
tree | 469603add1b3f2bb660911ba701eb05e8cd283c8 | |
parent | 15991bf775234d4d5c25510fe8703b4751bd31d1 (diff) |
Remove some redundancy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34702 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/VMCore/Constants.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index 0c50796433..37e0abec98 100644 --- a/lib/VMCore/Constants.cpp +++ b/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; } |