[compiler-rt] 692344d - [msan] Fix compilation on non-glibc

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 28 21:22:34 PDT 2023


Author: Brooks Davis
Date: 2023-08-28T21:22:29-07:00
New Revision: 692344d87357ded619d216b265a9375f4326d8fb

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

LOG: [msan] Fix compilation on non-glibc

SANITIZER_GLIBC is always defined so should be tested with an if not an
ifdef.

Fixes: ad7e2501000d

Reviewed By: MaskRay

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

Added: 
    

Modified: 
    compiler-rt/lib/msan/msan_interceptors.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/msan/msan_interceptors.cpp b/compiler-rt/lib/msan/msan_interceptors.cpp
index 9cb65d55372ff5..ba92bd14d319db 100644
--- a/compiler-rt/lib/msan/msan_interceptors.cpp
+++ b/compiler-rt/lib/msan/msan_interceptors.cpp
@@ -1767,7 +1767,7 @@ void InitializeInterceptors() {
   INTERCEPT_STRTO(wcstoul);
   INTERCEPT_STRTO(wcstoll);
   INTERCEPT_STRTO(wcstoull);
-#ifdef SANITIZER_GLIBC
+#if SANITIZER_GLIBC
   INTERCEPT_STRTO(__isoc23_strtod);
   INTERCEPT_STRTO(__isoc23_strtof);
   INTERCEPT_STRTO(__isoc23_strtold);


        


More information about the llvm-commits mailing list