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