[compiler-rt] 15c7e9f - [rtsan][NFC] Remove some unneeded headers, make guards more obvious (#114911)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 5 07:03:12 PST 2024
Author: Chris Apple
Date: 2024-11-05T07:03:06-08:00
New Revision: 15c7e9f9038e0c03c0dde1a8b85dd0f37072e832
URL: https://github.com/llvm/llvm-project/commit/15c7e9f9038e0c03c0dde1a8b85dd0f37072e832
DIFF: https://github.com/llvm/llvm-project/commit/15c7e9f9038e0c03c0dde1a8b85dd0f37072e832.diff
LOG: [rtsan][NFC] Remove some unneeded headers, make guards more obvious (#114911)
Added:
Modified:
compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp
compiler-rt/lib/rtsan/tests/rtsan_test_interceptors_posix.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp b/compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp
index b02be0b3cb51be..55241972167191 100644
--- a/compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp
+++ b/compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp
@@ -15,12 +15,10 @@
#include "interception/interception.h"
#include "sanitizer_common/sanitizer_allocator_dlsym.h"
-#include "sanitizer_common/sanitizer_allocator_internal.h"
#include "sanitizer_common/sanitizer_platform_interceptors.h"
#include "interception/interception.h"
#include "rtsan/rtsan.h"
-#include "rtsan/rtsan_context.h"
#if SANITIZER_APPLE
@@ -33,11 +31,11 @@ extern "C" {
typedef int32_t OSSpinLock;
void OSSpinLockLock(volatile OSSpinLock *__lock);
}
-#endif
+#endif // TARGET_OS_MAC
#include <libkern/OSAtomic.h>
#include <os/lock.h>
-#endif
+#endif // SANITIZER_APPLE
#if SANITIZER_INTERCEPT_MEMALIGN || SANITIZER_INTERCEPT_PVALLOC
#include <malloc.h>
diff --git a/compiler-rt/lib/rtsan/tests/rtsan_test_interceptors_posix.cpp b/compiler-rt/lib/rtsan/tests/rtsan_test_interceptors_posix.cpp
index bf7ea4ffe8599c..1850f4fa30f9cb 100644
--- a/compiler-rt/lib/rtsan/tests/rtsan_test_interceptors_posix.cpp
+++ b/compiler-rt/lib/rtsan/tests/rtsan_test_interceptors_posix.cpp
@@ -28,11 +28,6 @@
#include <malloc.h>
#endif
-#include <atomic>
-#include <chrono>
-#include <string>
-#include <thread>
-
#include <fcntl.h>
#include <pthread.h>
#include <stdio.h>
More information about the llvm-commits
mailing list