[compiler-rt] 1d0d1f2 - [msan] Remove unneeded nullness CHECK
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 11 12:35:38 PDT 2024
Author: Fangrui Song
Date: 2024-08-11T12:35:34-07:00
New Revision: 1d0d1f20e7733e3a230f30282c7339f2d3be19c0
URL: https://github.com/llvm/llvm-project/commit/1d0d1f20e7733e3a230f30282c7339f2d3be19c0
DIFF: https://github.com/llvm/llvm-project/commit/1d0d1f20e7733e3a230f30282c7339f2d3be19c0.diff
LOG: [msan] Remove unneeded nullness CHECK
The pointer will immediate be dereferenced.
Added:
Modified:
compiler-rt/lib/msan/msan_allocator.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/msan/msan_allocator.cpp b/compiler-rt/lib/msan/msan_allocator.cpp
index 1a0cc32beb5b2..d7d4967c94985 100644
--- a/compiler-rt/lib/msan/msan_allocator.cpp
+++ b/compiler-rt/lib/msan/msan_allocator.cpp
@@ -169,7 +169,6 @@ void __msan::LockAllocator() { allocator.ForceLock(); }
void __msan::UnlockAllocator() { allocator.ForceUnlock(); }
AllocatorCache *GetAllocatorCache(MsanThreadLocalMallocStorage *ms) {
- CHECK(ms);
CHECK_LE(sizeof(AllocatorCache), sizeof(ms->allocator_cache));
return reinterpret_cast<AllocatorCache *>(ms->allocator_cache);
}
@@ -237,7 +236,7 @@ static void *MsanAllocate(BufferedStackTrace *stack, uptr size, uptr alignment,
}
void __msan::MsanDeallocate(BufferedStackTrace *stack, void *p) {
- CHECK(p);
+ DCHECK(p);
UnpoisonParam(1);
RunFreeHooks(p);
More information about the llvm-commits
mailing list