[compiler-rt] e2adffc - [Sanitizers][Darwin] Deprecate SANITIZER_MAC - fail compilation if encountered

Mariusz Borsa via llvm-commits llvm-commits at lists.llvm.org
Tue May 31 18:09:09 PDT 2022


Author: Mariusz Borsa
Date: 2022-05-31T18:08:59-07:00
New Revision: e2adffc39c52d60eff655e356c13c0052737863e

URL: https://github.com/llvm/llvm-project/commit/e2adffc39c52d60eff655e356c13c0052737863e
DIFF: https://github.com/llvm/llvm-project/commit/e2adffc39c52d60eff655e356c13c0052737863e.diff

LOG: [Sanitizers][Darwin] Deprecate SANITIZER_MAC - fail compilation if encountered

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

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/sanitizer_platform.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform.h
index 66141dc09114..027e662a03f7 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform.h
@@ -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
@@ -99,7 +100,8 @@
 #  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


        


More information about the llvm-commits mailing list