[compiler-rt] bc9688f - [sanitizer] Define SANITIZER_ARM SANITIZER_X64 SANITIZER_ARM64
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 16 13:26:40 PST 2021
Author: Vitaly Buka
Date: 2021-12-16T13:26:33-08:00
New Revision: bc9688f4e4f2760ce0bf00dfb13cbdd5542bae4b
URL: https://github.com/llvm/llvm-project/commit/bc9688f4e4f2760ce0bf00dfb13cbdd5542bae4b
DIFF: https://github.com/llvm/llvm-project/commit/bc9688f4e4f2760ce0bf00dfb13cbdd5542bae4b.diff
LOG: [sanitizer] Define SANITIZER_ARM SANITIZER_X64 SANITIZER_ARM64
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 23d3fc5a1b6b..8de765cf6669 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform.h
@@ -138,6 +138,12 @@
# define SANITIZER_X32 0
#endif
+#if defined(__x86_64__) || defined(_M_X64)
+# define SANITIZER_X64 1
+#else
+# define SANITIZER_X64 0
+#endif
+
#if defined(__i386__) || defined(_M_IX86)
# define SANITIZER_I386 1
#else
@@ -207,12 +213,18 @@
# define SANITIZER_PPC64V2 0
#endif
-#if defined(__arm__)
+#if defined(__arm__) || defined(_M_ARM)
# define SANITIZER_ARM 1
#else
# define SANITIZER_ARM 0
#endif
+#if defined(__aarch64__) || defined(_M_ARM64)
+# define SANITIZER_ARM64 1
+#else
+# define SANITIZER_ARM64 0
+#endif
+
#if SANITIZER_SOLARIS && SANITIZER_WORDSIZE == 32
# define SANITIZER_SOLARIS32 1
#else
More information about the llvm-commits
mailing list