[compiler-rt] f71ba7d - [scudo] Convert assert to CHECK macro. (#67184)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 22 12:47:50 PDT 2023


Author: Christopher Ferris
Date: 2023-09-22T12:47:46-07:00
New Revision: f71ba7d323331bdb718e76a2f3a9562de835bb0d

URL: https://github.com/llvm/llvm-project/commit/f71ba7d323331bdb718e76a2f3a9562de835bb0d
DIFF: https://github.com/llvm/llvm-project/commit/f71ba7d323331bdb718e76a2f3a9562de835bb0d.diff

LOG: [scudo] Convert assert to CHECK macro. (#67184)

This code is only for riscv, but use the CHECK macro to avoid unused
parameters problems if assert is not defined.

Added: 
    

Modified: 
    compiler-rt/lib/scudo/standalone/tests/combined_test.cpp

Removed: 
    


################################################################################
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