1*bed243d3SAndroid Build Coastguard Worker //===-- sanitizer/coverage_interface.h --------------------------*- C++ -*-===// 2*bed243d3SAndroid Build Coastguard Worker // 3*bed243d3SAndroid Build Coastguard Worker // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*bed243d3SAndroid Build Coastguard Worker // See https://llvm.org/LICENSE.txt for license information. 5*bed243d3SAndroid Build Coastguard Worker // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*bed243d3SAndroid Build Coastguard Worker // 7*bed243d3SAndroid Build Coastguard Worker //===----------------------------------------------------------------------===// 8*bed243d3SAndroid Build Coastguard Worker // 9*bed243d3SAndroid Build Coastguard Worker // Public interface for sanitizer coverage. 10*bed243d3SAndroid Build Coastguard Worker //===----------------------------------------------------------------------===// 11*bed243d3SAndroid Build Coastguard Worker 12*bed243d3SAndroid Build Coastguard Worker #ifndef SANITIZER_COVERAG_INTERFACE_H 13*bed243d3SAndroid Build Coastguard Worker #define SANITIZER_COVERAG_INTERFACE_H 14*bed243d3SAndroid Build Coastguard Worker 15*bed243d3SAndroid Build Coastguard Worker #include <sanitizer/common_interface_defs.h> 16*bed243d3SAndroid Build Coastguard Worker 17*bed243d3SAndroid Build Coastguard Worker #ifdef __cplusplus 18*bed243d3SAndroid Build Coastguard Worker extern "C" { 19*bed243d3SAndroid Build Coastguard Worker #endif 20*bed243d3SAndroid Build Coastguard Worker 21*bed243d3SAndroid Build Coastguard Worker // Record and dump coverage info. 22*bed243d3SAndroid Build Coastguard Worker void SANITIZER_CDECL __sanitizer_cov_dump(void); 23*bed243d3SAndroid Build Coastguard Worker 24*bed243d3SAndroid Build Coastguard Worker // Clear collected coverage info. 25*bed243d3SAndroid Build Coastguard Worker void SANITIZER_CDECL __sanitizer_cov_reset(void); 26*bed243d3SAndroid Build Coastguard Worker 27*bed243d3SAndroid Build Coastguard Worker // Dump collected coverage info. Sorts pcs by module into individual .sancov 28*bed243d3SAndroid Build Coastguard Worker // files. 29*bed243d3SAndroid Build Coastguard Worker void SANITIZER_CDECL __sanitizer_dump_coverage(const uintptr_t *pcs, 30*bed243d3SAndroid Build Coastguard Worker uintptr_t len); 31*bed243d3SAndroid Build Coastguard Worker 32*bed243d3SAndroid Build Coastguard Worker #ifdef __cplusplus 33*bed243d3SAndroid Build Coastguard Worker } // extern "C" 34*bed243d3SAndroid Build Coastguard Worker #endif 35*bed243d3SAndroid Build Coastguard Worker 36*bed243d3SAndroid Build Coastguard Worker #endif // SANITIZER_COVERAG_INTERFACE_H 37