[compiler-rt] 45f9f3f - [NFC] Remove redundant branch
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 25 12:12:42 PDT 2023
Author: Vitaly Buka
Date: 2023-07-25T12:12:25-07:00
New Revision: 45f9f3f7108171d370587b5f1c02c6253c813717
URL: https://github.com/llvm/llvm-project/commit/45f9f3f7108171d370587b5f1c02c6253c813717
DIFF: https://github.com/llvm/llvm-project/commit/45f9f3f7108171d370587b5f1c02c6253c813717.diff
LOG: [NFC] Remove redundant branch
memset already covers the case.
Reviewed By: kstoimenov
Differential Revision: https://reviews.llvm.org/D156183
Added:
Modified:
compiler-rt/lib/asan/asan_poisoning.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/asan/asan_poisoning.cpp b/compiler-rt/lib/asan/asan_poisoning.cpp
index e99b91d9c0a7ea..6bfc79ecb34b9c 100644
--- a/compiler-rt/lib/asan/asan_poisoning.cpp
+++ b/compiler-rt/lib/asan/asan_poisoning.cpp
@@ -160,10 +160,6 @@ void __asan_unpoison_memory_region(void const volatile *addr, uptr size) {
return;
}
CHECK_LT(beg.chunk, end.chunk);
- if (beg.offset > 0) {
- *beg.chunk = 0;
- beg.chunk++;
- }
REAL(memset)(beg.chunk, 0, end.chunk - beg.chunk);
if (end.offset > 0 && end.value != 0) {
*end.chunk = Max(end.value, end.offset);
More information about the llvm-commits
mailing list