1 //===-- santizer_win_dynamic_runtime_thunk.cpp ----------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 // 9 // This file defines things that need to be present in the application modules 10 // to interact with Sanitizer Common, when it is included in a dll. 11 // 12 //===----------------------------------------------------------------------===// 13 #ifdef SANITIZER_DYNAMIC_RUNTIME_THUNK 14 #define SANITIZER_IMPORT_INTERFACE 1 15 #include "sanitizer_win_defs.h" 16 // Define weak alias for all weak functions imported from sanitizer common. 17 #define INTERFACE_FUNCTION(Name) 18 #define INTERFACE_WEAK_FUNCTION(Name) WIN_WEAK_IMPORT_DEF(Name) 19 #include "sanitizer_common_interface.inc" 20 #endif // SANITIZER_DYNAMIC_RUNTIME_THUNK 21 22 namespace __sanitizer { 23 // Add one, otherwise unused, external symbol to this object file so that the 24 // Visual C++ linker includes it and reads the .drective section. ForceWholeArchiveIncludeForSanitizerCommon()25void ForceWholeArchiveIncludeForSanitizerCommon() {} 26 } 27