Path: blob/main/contrib/llvm-project/compiler-rt/lib/fuzzer/FuzzerExtFunctions.h
35262 views
//===- FuzzerExtFunctions.h - Interface to external functions ---*- C++ -* ===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7// Defines an interface to (possibly optional) functions.8//===----------------------------------------------------------------------===//910#ifndef LLVM_FUZZER_EXT_FUNCTIONS_H11#define LLVM_FUZZER_EXT_FUNCTIONS_H1213#include <stddef.h>14#include <stdint.h>1516namespace fuzzer {1718struct ExternalFunctions {19// Initialize function pointers. Functions that are not available will be set20// to nullptr. Do not call this constructor before ``main()`` has been21// entered.22ExternalFunctions();2324#define EXT_FUNC(NAME, RETURN_TYPE, FUNC_SIG, WARN) \25RETURN_TYPE(*NAME) FUNC_SIG = nullptr2627#include "FuzzerExtFunctions.def"2829#undef EXT_FUNC30};31} // namespace fuzzer3233#endif343536