[compiler-rt] [scudo] Convert assert to CHECK macro. (PR #67184)
Christopher Ferris via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 22 12:25:39 PDT 2023
https://github.com/cferris1000 created https://github.com/llvm/llvm-project/pull/67184
This code is only for riscv, but use the CHECK macro to avoid unused parameters problems if assert is not defined.
>From f808a675b7ce5efb9d50a7551d239eac376e2de3 Mon Sep 17 00:00:00 2001
From: Christopher Ferris <cferris at google.com>
Date: Fri, 22 Sep 2023 12:23:45 -0700
Subject: [PATCH] [scudo] Convert assert to CHECK macro.
This code is only for riscv, but use the CHECK macro to avoid unused
parameters problems if assert is not defined.
---
compiler-rt/lib/scudo/standalone/tests/combined_test.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/compiler-rt/lib/scudo/standalone/tests/combined_test.cpp b/compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
index f00d475148e8dcd..1143aaab8371d37 100644
--- a/compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
+++ b/compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
@@ -106,8 +106,8 @@ struct TestAllocatorStorage {
// To alleviate some problem, let's skip the thread safety analysis here.
static void *get(size_t size) NO_THREAD_SAFETY_ANALYSIS {
- assert(size <= kMaxSize &&
- "Allocation size doesn't fit in the allocator storage");
+ CHECK(size <= kMaxSize &&
+ "Allocation size doesn't fit in the allocator storage");
M.lock();
return AllocatorStorage;
}
More information about the llvm-commits
mailing list