[compiler-rt] r230425 - [asan] attempting to fix the windows build

Kostya Serebryany kcc at google.com
Tue Feb 24 17:41:42 PST 2015


Author: kcc
Date: Tue Feb 24 19:41:42 2015
New Revision: 230425

URL: http://llvm.org/viewvc/llvm-project?rev=230425&view=rev
Log:
[asan] attempting to fix the windows build 

Modified:
    compiler-rt/trunk/lib/asan/asan_suppressions.cc

Modified: compiler-rt/trunk/lib/asan/asan_suppressions.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_suppressions.cc?rev=230425&r1=230424&r2=230425&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_suppressions.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_suppressions.cc Tue Feb 24 19:41:42 2015
@@ -31,23 +31,22 @@ static const char *kSuppressionTypes[] =
     kInterceptorName, kInterceptorViaFunction, kInterceptorViaLibrary,
     kODRViolation};
 
-extern "C" {
 #if SANITIZER_SUPPORTS_WEAK_HOOKS
+extern "C" {
 SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE
 const char *__asan_default_suppressions();
-#else
-// No week hooks, provide empty implementation.
-const char *__asan_default_suppressions() { return ""; }
-#endif  // SANITIZER_SUPPORTS_WEAK_HOOKS
 }  // extern "C"
+#endif  // SANITIZER_SUPPORTS_WEAK_HOOKS
 
 void InitializeSuppressions() {
   CHECK_EQ(nullptr, suppression_ctx);
   suppression_ctx = new (suppression_placeholder)  // NOLINT
       SuppressionContext(kSuppressionTypes, ARRAY_SIZE(kSuppressionTypes));
   suppression_ctx->ParseFromFile(flags()->suppressions);
+#if SANITIZER_SUPPORTS_WEAK_HOOKS
   if (&__asan_default_suppressions)
     suppression_ctx->Parse(__asan_default_suppressions());
+#endif  // SANITIZER_SUPPORTS_WEAK_HOOKS
 }
 
 bool IsInterceptorSuppressed(const char *interceptor_name) {





More information about the llvm-commits mailing list