1 //===- FuzzerExtFunctions.h - Interface to external functions ---*- C++ -* ===//
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
7 //===----------------------------------------------------------------------===//
8 // Defines an interface to (possibly optional) functions.
9 //===----------------------------------------------------------------------===//
11 #ifndef LLVM_FUZZER_EXT_FUNCTIONS_H
12 #define LLVM_FUZZER_EXT_FUNCTIONS_H
19 struct ExternalFunctions
{
20 // Initialize function pointers. Functions that are not available will be set
21 // to nullptr. Do not call this constructor before ``main()`` has been
25 #define EXT_FUNC(NAME, RETURN_TYPE, FUNC_SIG, WARN) \
26 RETURN_TYPE(*NAME) FUNC_SIG = nullptr
28 #include "FuzzerExtFunctions.def"