| 1 | //===-- sanitizer_win_interception.h ---------------------- --*- C++ -*-===// |
| 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 | // Windows-specific export surface to provide interception for parts of the |
| 10 | // runtime that are always statically linked, both for overriding user-defined |
| 11 | // functions as well as registering weak functions that the ASAN runtime should |
| 12 | // use over defaults. |
| 13 | // |
| 14 | //===----------------------------------------------------------------------===// |
| 15 | |
| 16 | #ifndef SANITIZER_WIN_INTERCEPTION_H |
| 17 | #define SANITIZER_WIN_INTERCEPTION_H |
| 18 | |
| 19 | #include "sanitizer_platform.h" |
| 20 | #if SANITIZER_WINDOWS |
| 21 | |
| 22 | # include "sanitizer_common.h" |
| 23 | # include "sanitizer_internal_defs.h" |
| 24 | |
| 25 | namespace __sanitizer { |
| 26 | using RegisterWeakFunctionCallback = void (*)(); |
| 27 | void AddRegisterWeakFunctionCallback(uptr export_address, |
| 28 | RegisterWeakFunctionCallback cb); |
| 29 | } // namespace __sanitizer |
| 30 | |
| 31 | #endif // SANITIZER_WINDOWS |
| 32 | #endif // SANITIZER_WIN_INTERCEPTION_H |