aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2015-02-25 01:41:42 +0000
committerKostya Serebryany <kcc@google.com>2015-02-25 01:41:42 +0000
commita54860e0583ef24cfd91d5ba8c79fd5b4381c68a (patch)
treebfdb80cc510927303a75b4a736e9335e8f8845b8
parente95edbf5a966ed5e5c6f1683ef5e37c10fd10192 (diff)
downloadllvm-a54860e0583ef24cfd91d5ba8c79fd5b4381c68a.zip
llvm-a54860e0583ef24cfd91d5ba8c79fd5b4381c68a.tar.gz
llvm-a54860e0583ef24cfd91d5ba8c79fd5b4381c68a.tar.bz2
[asan] attempting to fix the windows build
llvm-svn: 230425
-rw-r--r--compiler-rt/lib/asan/asan_suppressions.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler-rt/lib/asan/asan_suppressions.cc b/compiler-rt/lib/asan/asan_suppressions.cc
index 3f76e20..6912c6a 100644
--- a/compiler-rt/lib/asan/asan_suppressions.cc
+++ b/compiler-rt/lib/asan/asan_suppressions.cc
@@ -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) {