1 //===- FuzzerExtFunctions.h - Interface to external functions ---*- C++ -* ===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
9 // Defines an interface to (possibly optional) functions.
10 //===----------------------------------------------------------------------===//
12 #ifndef LLVM_FUZZER_EXT_FUNCTIONS_H
13 #define LLVM_FUZZER_EXT_FUNCTIONS_H
20 struct ExternalFunctions {
21 // Initialize function pointers. Functions that are not available will be set
22 // to nullptr. Do not call this constructor before ``main()`` has been
26 #define EXT_FUNC(NAME, RETURN_TYPE, FUNC_SIG, WARN) \
27 RETURN_TYPE(*NAME) FUNC_SIG = nullptr
29 #include "FuzzerExtFunctions.def"