[compiler-rt] r280962 - Fix linker warning about sanitizer_common_nolibc functions on Windows

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 8 09:46:06 PDT 2016


Author: rnk
Date: Thu Sep  8 11:46:06 2016
New Revision: 280962

URL: http://llvm.org/viewvc/llvm-project?rev=280962&view=rev
Log:
Fix linker warning about sanitizer_common_nolibc functions on Windows

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_nolibc.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_nolibc.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_nolibc.cc?rev=280962&r1=280961&r2=280962&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_nolibc.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_nolibc.cc Thu Sep  8 11:46:06 2016
@@ -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




More information about the llvm-commits mailing list