1*217222abSNico Weber //===-- asan_win_weak_interception.cpp ------------------------------------===//
2*217222abSNico Weber //
3*217222abSNico Weber // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*217222abSNico Weber // See https://llvm.org/LICENSE.txt for license information.
5*217222abSNico Weber // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*217222abSNico Weber //
7*217222abSNico Weber //===----------------------------------------------------------------------===//
8*217222abSNico Weber // This module should be included in Address Sanitizer when it is implemented as
9*217222abSNico Weber // a shared library on Windows (dll), in order to delegate the calls of weak
10*217222abSNico Weber // functions to the implementation in the main executable when a strong
11*217222abSNico Weber // definition is provided.
12*217222abSNico Weber //===----------------------------------------------------------------------===//
13*217222abSNico Weber #ifdef SANITIZER_DYNAMIC
14*217222abSNico Weber #include "sanitizer_common/sanitizer_win_weak_interception.h"
15*217222abSNico Weber #include "asan_interface_internal.h"
16*217222abSNico Weber // Check if strong definitions for weak functions are present in the main
17*217222abSNico Weber // executable. If that is the case, override dll functions to point to strong
18*217222abSNico Weber // implementations.
19*217222abSNico Weber #define INTERFACE_FUNCTION(Name)
20*217222abSNico Weber #define INTERFACE_WEAK_FUNCTION(Name) INTERCEPT_SANITIZER_WEAK_FUNCTION(Name)
21*217222abSNico Weber #include "asan_interface.inc"
22*217222abSNico Weber #endif // SANITIZER_DYNAMIC
23