[compiler-rt] cbcab14 - [compiler-rt] Silence a deprecation warning on FreeBSD

Alex Richardson via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 10 03:18:28 PST 2021


Author: Alex Richardson
Date: 2021-03-10T11:17:33Z
New Revision: cbcab14b19fce821a40a72a6f510207ced916a23

URL: https://github.com/llvm/llvm-project/commit/cbcab14b19fce821a40a72a6f510207ced916a23
DIFF: https://github.com/llvm/llvm-project/commit/cbcab14b19fce821a40a72a6f510207ced916a23.diff

LOG: [compiler-rt] Silence a deprecation warning on FreeBSD

On FreeBSD the sys/timeb.h header has a #warning that it's deprecated.
However, we need to include this header here, so silence this warning that
is printed multiple times otherwise.

Reviewed By: dim

Differential Revision: https://reviews.llvm.org/D94963

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.cpp
index b1c15be58dea..b5a45ae72cd9 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.cpp
@@ -35,7 +35,10 @@
 #include <sys/stat.h>
 #include <sys/statvfs.h>
 #include <sys/time.h>
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-W#warnings"
 #include <sys/timeb.h>
+#pragma clang diagnostic pop
 #include <sys/times.h>
 #include <sys/timespec.h>
 #include <sys/types.h>


        


More information about the llvm-commits mailing list