[compiler-rt] 806e8a1 - [Sanitizer][Darwin] Add SANITIZER_DRIVERKIT platform macro

Julian Lettner via llvm-commits llvm-commits at lists.llvm.org
Mon May 23 11:21:51 PDT 2022


Author: Julian Lettner
Date: 2022-05-23T11:21:45-07:00
New Revision: 806e8a1c8e54b6f8563eae0c0ed6b719b7eb6089

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

LOG: [Sanitizer][Darwin] Add SANITIZER_DRIVERKIT platform macro

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 91c0c5233f794..edf32843189c3 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform.h
@@ -85,6 +85,11 @@
 #  else
 #    define SANITIZER_IOSSIM 0
 #  endif
+#  if TARGET_OS_DRIVERKIT
+#    define SANITIZER_DRIVERKIT 1
+#  else
+#    define SANITIZER_DRIVERKIT 0
+#  endif
 #else
 #  define SANITIZER_APPLE 0
 #  define SANITIZER_MAC SANITIZER_APPLE
@@ -93,6 +98,7 @@
 #  define SANITIZER_TVOS 0
 #  define SANITIZER_IOSSIM 0
 #  define SANITIZER_OSX 0
+#  define SANITIZER_DRIVERKIT 0
 #endif
 
 #if defined(_WIN32)


        


More information about the llvm-commits mailing list