Deleted Added
full compact
FuzzerExtFunctions.h (341825) FuzzerExtFunctions.h (353358)
1//===- FuzzerExtFunctions.h - Interface to external functions ---*- C++ -* ===//
2//
1//===- FuzzerExtFunctions.h - Interface to external functions ---*- C++ -* ===//
2//
3// The LLVM Compiler Infrastructure
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
4//
6//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9// Defines an interface to (possibly optional) functions.
10//===----------------------------------------------------------------------===//
11
12#ifndef LLVM_FUZZER_EXT_FUNCTIONS_H
13#define LLVM_FUZZER_EXT_FUNCTIONS_H
14
15#include <stddef.h>
16#include <stdint.h>
17
18namespace fuzzer {
19
20struct 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
23 // entered.
24 ExternalFunctions();
25
26#define EXT_FUNC(NAME, RETURN_TYPE, FUNC_SIG, WARN) \
27 RETURN_TYPE(*NAME) FUNC_SIG = nullptr
28
29#include "FuzzerExtFunctions.def"
30
31#undef EXT_FUNC
32};
33} // namespace fuzzer
34
35#endif
7//===----------------------------------------------------------------------===//
8// Defines an interface to (possibly optional) functions.
9//===----------------------------------------------------------------------===//
10
11#ifndef LLVM_FUZZER_EXT_FUNCTIONS_H
12#define LLVM_FUZZER_EXT_FUNCTIONS_H
13
14#include <stddef.h>
15#include <stdint.h>
16
17namespace fuzzer {
18
19struct 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
22 // entered.
23 ExternalFunctions();
24
25#define EXT_FUNC(NAME, RETURN_TYPE, FUNC_SIG, WARN) \
26 RETURN_TYPE(*NAME) FUNC_SIG = nullptr
27
28#include "FuzzerExtFunctions.def"
29
30#undef EXT_FUNC
31};
32} // namespace fuzzer
33
34#endif