1*65492d95SNico Weber //===-- sanitizer_coverage_win_dynamic_runtime_thunk.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 //
9*65492d95SNico Weber // This file defines things that need to be present in the application modules
10*65492d95SNico Weber // to interact with Sanitizer Coverage, when it is included in a dll.
11*65492d95SNico Weber //
12*65492d95SNico Weber //===----------------------------------------------------------------------===//
13*65492d95SNico Weber #ifdef SANITIZER_DYNAMIC_RUNTIME_THUNK
14*65492d95SNico Weber #define SANITIZER_IMPORT_INTERFACE 1
15*65492d95SNico Weber #include "sanitizer_win_defs.h"
16*65492d95SNico Weber // Define weak alias for all weak functions imported from sanitizer coverage.
17*65492d95SNico Weber #define INTERFACE_FUNCTION(Name)
18*65492d95SNico Weber #define INTERFACE_WEAK_FUNCTION(Name) WIN_WEAK_IMPORT_DEF(Name)
19*65492d95SNico Weber #include "sanitizer_coverage_interface.inc"
20*65492d95SNico Weber #endif // SANITIZER_DYNAMIC_RUNTIME_THUNK
21*65492d95SNico Weber 
22*65492d95SNico Weber namespace __sanitizer {
23*65492d95SNico Weber // Add one, otherwise unused, external symbol to this object file so that the
24*65492d95SNico Weber // Visual C++ linker includes it and reads the .drective section.
ForceWholeArchiveIncludeForSanCov()25*65492d95SNico Weber void ForceWholeArchiveIncludeForSanCov() {}
26*65492d95SNico Weber }
27