From 6cdabe1f2e760af91d8a23d47e4bbf06d0120bd4 Mon Sep 17 00:00:00 2001 From: Santiago Aboy Solanes Date: Fri, 18 Feb 2022 15:27:43 +0000 Subject: Update runtime/ implications to use (D)CHECK_IMPLIES Follow-up to aosp/1988868 in which we added the (D)CHECK_IMPLIES macro. This CL uses it on compiler/ occurrences found by a regex. Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Change-Id: Id4ee45b41bad85a1f0d98c1e88af6baa3e34a662 --- runtime/mirror/string-alloc-inl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/mirror/string-alloc-inl.h') diff --git a/runtime/mirror/string-alloc-inl.h b/runtime/mirror/string-alloc-inl.h index 5f3abd75e3..533053d934 100644 --- a/runtime/mirror/string-alloc-inl.h +++ b/runtime/mirror/string-alloc-inl.h @@ -45,7 +45,7 @@ class SetStringCountVisitor { // Avoid AsString as object is not yet in live bitmap or allocation stack. ObjPtr string = ObjPtr::DownCast(obj); string->SetCount(count_); - DCHECK(!string->IsCompressed() || kUseStringCompression); + DCHECK_IMPLIES(string->IsCompressed(), kUseStringCompression); } private: @@ -65,7 +65,7 @@ class SetStringCountAndBytesVisitor { // Avoid AsString as object is not yet in live bitmap or allocation stack. ObjPtr string = ObjPtr::DownCast(obj); string->SetCount(count_); - DCHECK(!string->IsCompressed() || kUseStringCompression); + DCHECK_IMPLIES(string->IsCompressed(), kUseStringCompression); int32_t length = String::GetLengthFromCount(count_); const uint8_t* const src = reinterpret_cast(src_array_->GetData()) + offset_; if (string->IsCompressed()) { -- cgit v1.2.3-59-g8ed1b