summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-05-14 15:46:27 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-05-14 15:46:27 +0000
commit00570224891da83c5066b8d135232f96786dbd56 (patch)
treee3237abe14c6489a79e1602206bfc34a06ac89a2 /include
parent9e10d773e155fcd9fba9c3e1a7d2e49f31c42731 (diff)
downloadllvm-00570224891da83c5066b8d135232f96786dbd56.tar.gz
llvm-00570224891da83c5066b8d135232f96786dbd56.tar.bz2
llvm-00570224891da83c5066b8d135232f96786dbd56.tar.xz
Remove the expensive BitVector::operator~().
Returning a temporary BitVector is very expensive. If you must, create the temporary explicitly: Use BitVector(A).flip() instead of ~A. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156768 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ADT/BitVector.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/include/llvm/ADT/BitVector.h b/include/llvm/ADT/BitVector.h
index 23aad6e119..3cbaf1a2f5 100644
--- a/include/llvm/ADT/BitVector.h
+++ b/include/llvm/ADT/BitVector.h
@@ -251,11 +251,6 @@ public:
return *this;
}
- // No argument flip.
- BitVector operator~() const {
- return BitVector(*this).flip();
- }
-
// Indexing.
reference operator[](unsigned Idx) {
assert (Idx < Size && "Out-of-bounds Bit access.");