Skip to content

Commit

Permalink
[Sanitizer][Darwin] Add explanation for Apple platform macros
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D126229
  • Loading branch information
Julian Lettner committed May 23, 2022
1 parent 7ffc99b commit 1962389
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion compiler-rt/lib/sanitizer_common/sanitizer_platform.h
Expand Up @@ -55,6 +55,13 @@
# define SANITIZER_SOLARIS 0
#endif

// - SANITIZER_APPLE: all Apple code
// - TARGET_OS_OSX: macOS
// - SANITIZER_IOS: devices (iOS and iOS-like)
// - SANITIZER_WATCHOS
// - SANITIZER_TVOS
// - SANITIZER_IOSSIM: simulators (iOS and iOS-like)
// - SANITIZER_DRIVERKIT
#if defined(__APPLE__)
# define SANITIZER_APPLE 1
// SANITIZER_MAC will be deprecated/removed in the future
Expand Down Expand Up @@ -93,11 +100,11 @@
#else
# define SANITIZER_APPLE 0
# define SANITIZER_MAC SANITIZER_APPLE
# define SANITIZER_OSX 0
# define SANITIZER_IOS 0
# define SANITIZER_WATCHOS 0
# define SANITIZER_TVOS 0
# define SANITIZER_IOSSIM 0
# define SANITIZER_OSX 0
# define SANITIZER_DRIVERKIT 0
#endif

Expand Down

0 comments on commit 1962389

Please sign in to comment.