[compiler-rt] r178238 - [Sanitizer] Minor enhancements in InternalVector container
Alexander Potapenko
glider at google.com
Thu Mar 28 09:38:40 PDT 2013
Which configuration enables DCHECKs? Are they enabled on our bots? If
not, they're almost useless and may rot soon.
On Thu, Mar 28, 2013 at 7:37 PM, Alexey Samsonov <samsonov at google.com> wrote:
> Author: samsonov
> Date: Thu Mar 28 10:37:11 2013
> New Revision: 178238
>
> URL: http://llvm.org/viewvc/llvm-project?rev=178238&view=rev
> Log:
> [Sanitizer] Minor enhancements in InternalVector container
>
> Modified:
> compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h
>
> Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h
> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h?rev=178238&r1=178237&r2=178238&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h (original)
> +++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h Thu Mar 28 10:37:11 2013
> @@ -282,7 +282,11 @@ class InternalVector {
> UnmapOrDie(data_, capacity_ * sizeof(T));
> }
> T &operator[](uptr i) {
> - CHECK_LT(i, size_);
> + DCHECK_LT(i, size_);
> + return data_[i];
> + }
> + const T &operator[](uptr i) const {
> + DCHECK_LT(i, size_);
> return data_[i];
> }
> void push_back(const T &element) {
> @@ -301,7 +305,7 @@ class InternalVector {
> CHECK_GT(size_, 0);
> size_--;
> }
> - uptr size() {
> + uptr size() const {
> return size_;
> }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
--
Alexander Potapenko
Software Engineer
Google Moscow
More information about the llvm-commits
mailing list