From 490ccc9cc71e714f85e239913cbbcc1797c85fb8 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Thu, 8 Sep 2016 16:46:06 +0000 Subject: [PATCH] Fix linker warning about sanitizer_common_nolibc functions on Windows llvm-svn: 280962 --- compiler-rt/lib/sanitizer_common/sanitizer_common_nolibc.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_nolibc.cc b/compiler-rt/lib/sanitizer_common/sanitizer_common_nolibc.cc index e24cf998ec69..59edcbaef694 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_common_nolibc.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_nolibc.cc @@ -17,6 +17,9 @@ namespace __sanitizer { +// The Windows implementations of these functions use the win32 API directly, +// bypassing libc. +#if !SANITIZER_WINDOWS #if SANITIZER_LINUX bool ShouldLogAfterPrintf() { return false; } void LogMessageOnPrintf(const char *str) {} @@ -24,5 +27,6 @@ void LogMessageOnPrintf(const char *str) {} void WriteToSyslog(const char *buffer) {} void Abort() { internal__exit(1); } void SleepForSeconds(int seconds) { internal_sleep(seconds); } +#endif // !SANITIZER_WINDOWS } // namespace __sanitizer