[compiler-rt] 376db8e - [sanitizer] Mark g_use_dlpi_tls_data as unused

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 16 09:28:56 PDT 2021


Author: Fangrui Song
Date: 2021-04-16T09:28:51-07:00
New Revision: 376db8eaef3a06cf963eba9e8009048dc93689f0

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

LOG: [sanitizer] Mark g_use_dlpi_tls_data as unused

There is a -Wunused-variable warning on Android

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
index 52f65a0faaf4b..42c38add033dc 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
@@ -194,9 +194,7 @@ __attribute__((unused)) static bool GetLibcVersion(int *major, int *minor,
 // musl before 1.2.3 and FreeBSD as of 12.2 incorrectly set dlpi_tls_data to
 // the TLS initialization image
 // https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254774
-#if !SANITIZER_GO
-static int g_use_dlpi_tls_data;
-#endif
+__attribute__((unused)) static int g_use_dlpi_tls_data;
 
 #if SANITIZER_GLIBC && !SANITIZER_GO
 __attribute__((unused)) static uptr g_tls_size;


        


More information about the llvm-commits mailing list