[Sanitizers][Darwin] Deprecate SANITIZER_MAC - fail compilation if encountered
authorMariusz Borsa <m_borsa@apple.com>
Fri, 27 May 2022 23:15:07 +0000 (16:15 -0700)
committerMariusz Borsa <m_borsa@apple.com>
Wed, 1 Jun 2022 01:08:59 +0000 (18:08 -0700)
Previous couple commits replaced SANITIZER_MAC with SANITIZER_APPLE in bulk.
This change will prompt anyone still trying to use SANITIZER_MAC to rename.

Differential Revision: https://reviews.llvm.org/D126577

compiler-rt/lib/sanitizer_common/sanitizer_platform.h

index 66141dc..027e662 100644 (file)
@@ -65,7 +65,8 @@
 #if defined(__APPLE__)
 #  define SANITIZER_APPLE 1
 // SANITIZER_MAC will be deprecated/removed in the future
-#  define SANITIZER_MAC SANITIZER_APPLE
+#  define SANITIZER_MAC \
+     error "SANITIZER_MAC will be removed, please use SANITIZER_APPLE"
 #  include <TargetConditionals.h>
 #  if TARGET_OS_OSX
 #    define SANITIZER_OSX 1
 #  endif
 #else
 #  define SANITIZER_APPLE 0
-#  define SANITIZER_MAC SANITIZER_APPLE
+#  define SANITIZER_MAC \
+     error "SANITIZER_MAC will be removed, please use SANITIZER_APPLE"
 #  define SANITIZER_OSX 0
 #  define SANITIZER_IOS 0
 #  define SANITIZER_WATCHOS 0