Remove assertions from the SmallVector class. They slow down clients of

smallvector too much in a release build.  Removing them speeds up isel 4%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29556 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-08-07 23:41:59 +00:00
parent 51a4911121
commit d0337c1678

View File

@ -15,7 +15,6 @@
#define LLVM_ADT_SMALLVECTOR_H
#include <algorithm>
#include <cassert>
#include <iterator>
#include <memory>
@ -91,20 +90,16 @@ public:
const_iterator end() const { return End; }
reference operator[](unsigned idx) {
assert(idx < size() && "out of range reference!");
return Begin[idx];
}
const_reference operator[](unsigned idx) const {
assert(idx < size() && "out of range reference!");
return Begin[idx];
}
reference back() {
assert(!empty() && "SmallVector is empty!");
return end()[-1];
}
const_reference back() const {
assert(!empty() && "SmallVector is empty!");
return end()[-1];
}
@ -120,7 +115,6 @@ public:
}
void pop_back() {
assert(!empty() && "SmallVector is empty!");
--End;
End->~T();
}