1 //===-- printf_sanitizer_common.cpp -----------------------------*- 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 #include "gwp_asan/optional/segv_handler.h" 10 #include "sanitizer_common/sanitizer_common.h" 11 12 namespace gwp_asan { 13 namespace test { 14 // This printf-function getter allows other platforms (e.g. Android) to define 15 // their own signal-safe Printf function. In LLVM, we use 16 // `optional/printf_sanitizer_common.cpp` which supplies the __sanitizer::Printf 17 // for this purpose. getPrintfFunction()18crash_handler::Printf_t getPrintfFunction() { return __sanitizer::Printf; } 19 }; // namespace test 20 }; // namespace gwp_asan 21