summaryrefslogtreecommitdiff
path: root/compiler/utils/swap_space.h
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/utils/swap_space.h')
-rw-r--r--compiler/utils/swap_space.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/utils/swap_space.h b/compiler/utils/swap_space.h
index a472943518..827e9a6366 100644
--- a/compiler/utils/swap_space.h
+++ b/compiler/utils/swap_space.h
@@ -26,6 +26,7 @@
#include <android-base/logging.h>
+#include "base/logging.h"
#include "base/macros.h"
#include "base/mutex.h"
@@ -179,7 +180,7 @@ class SwapAllocator {
DCHECK_LE(n, max_size());
if (swap_space_ == nullptr) {
T* result = reinterpret_cast<T*>(malloc(n * sizeof(T)));
- CHECK(result != nullptr || n == 0u); // Abort if malloc() fails.
+ CHECK_IMPLIES(result == nullptr, n == 0u); // Abort if malloc() fails.
return result;
} else {
return reinterpret_cast<T*>(swap_space_->Alloc(n * sizeof(T)));