diff --git a/compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp b/compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp index b02be0b3cb51b..5524197216719 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 #include -#endif +#endif // SANITIZER_APPLE #if SANITIZER_INTERCEPT_MEMALIGN || SANITIZER_INTERCEPT_PVALLOC #include 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 8ed933fad51b1..9ddaa5d5eb590 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 #endif -#include -#include -#include -#include - #include #include #include