summaryrefslogtreecommitdiff
path: root/runtime/mirror/string-alloc-inl.h
diff options
context:
space:
mode:
author Santiago Aboy Solanes <solanes@google.com> 2022-02-18 15:27:43 +0000
committer Santiago Aboy Solanes <solanes@google.com> 2022-02-25 08:18:14 +0000
commit6cdabe1f2e760af91d8a23d47e4bbf06d0120bd4 (patch)
treeebf27edb910b6967914c3084c9f924035d12daa2 /runtime/mirror/string-alloc-inl.h
parent872ec72de447b2803894e17253399a54a4c10e1f (diff)
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
Diffstat (limited to 'runtime/mirror/string-alloc-inl.h')
-rw-r--r--runtime/mirror/string-alloc-inl.h4
1 files changed, 2 insertions, 2 deletions
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> string = ObjPtr<String>::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> string = ObjPtr<String>::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<uint8_t*>(src_array_->GetData()) + offset_;
if (string->IsCompressed()) {