summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-02-15 19:18:12 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-02-15 19:18:12 +0000
commit410bee347827cb40db4ca479b4261d24af8c0f0c (patch)
treec668374eef69f2e0bcbf3805864d134d695db49f /llvm
parent1e92e0677924e18ecbb68f403067778b33e9c59c (diff)
downloadbcm5719-llvm-410bee347827cb40db4ca479b4261d24af8c0f0c.tar.gz
bcm5719-llvm-410bee347827cb40db4ca479b4261d24af8c0f0c.zip
Remove unnecessary checks.
llvm-svn: 34319
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/ADT/BitVector.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/llvm/include/llvm/ADT/BitVector.h b/llvm/include/llvm/ADT/BitVector.h
index 0677b5449db..d7284731173 100644
--- a/llvm/include/llvm/ADT/BitVector.h
+++ b/llvm/include/llvm/ADT/BitVector.h
@@ -179,10 +179,8 @@ public:
// Set, reset, flip
BitVector &set() {
- if (Bits) {
- init_words(Bits, Capacity, true);
- clear_unused_bits();
- }
+ init_words(Bits, Capacity, true);
+ clear_unused_bits();
return *this;
}
@@ -192,8 +190,7 @@ public:
}
BitVector &reset() {
- if (Bits)
- init_words(Bits, Capacity, false);
+ init_words(Bits, Capacity, false);
return *this;
}
@@ -317,14 +314,12 @@ private:
std::copy(Bits, &Bits[OldCapacity], NewBits);
// Destroy the old bits.
- if (Bits)
- delete[] Bits;
+ delete[] Bits;
Bits = NewBits;
}
void init_words(BitWord *B, unsigned NumWords, bool t) {
- if (B)
- memset(B, 0 - (int)t, NumWords*sizeof(BitWord));
+ memset(B, 0 - (int)t, NumWords*sizeof(BitWord));
}
};
OpenPOWER on IntegriCloud