diff --git a/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp b/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp index 4f1708ba1901f2..d82b542a020e76 100644 --- a/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp +++ b/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp @@ -12,7 +12,7 @@ #include "sanitizer_common/sanitizer_platform.h" #include "ubsan_platform.h" -#if CAN_SANITIZE_UB && !SANITIZER_WINDOWS +#if CAN_SANITIZE_UB && !defined(_MSC_VER) #include "ubsan_type_hash.h" #include "sanitizer_common/sanitizer_common.h" diff --git a/compiler-rt/lib/ubsan/ubsan_type_hash_win.cpp b/compiler-rt/lib/ubsan/ubsan_type_hash_win.cpp index 45dcb758ec445a..106fa1b85a558d 100644 --- a/compiler-rt/lib/ubsan/ubsan_type_hash_win.cpp +++ b/compiler-rt/lib/ubsan/ubsan_type_hash_win.cpp @@ -12,7 +12,7 @@ #include "sanitizer_common/sanitizer_platform.h" #include "ubsan_platform.h" -#if CAN_SANITIZE_UB && SANITIZER_WINDOWS +#if CAN_SANITIZE_UB && defined(_MSC_VER) #include "ubsan_type_hash.h" #include "sanitizer_common/sanitizer_common.h"