llvm-capstone/libcxx/fuzzing/fuzzing.h
Chandler Carruth 57b08b0944 Update more file headers across all of the LLVM projects in the monorepo
to reflect the new license. These used slightly different spellings that
defeated my regular expressions.

We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.

Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.

llvm-svn: 351648
2019-01-19 10:56:40 +00:00

62 lines
2.5 KiB
C++

// -*- C++ -*-
//===-------------------------- fuzzing.h --------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef _LIBCPP_FUZZING
#define _LIBCPP_FUZZING
#include <cstddef> // for size_t
#include <cstdint> // for uint8_t
namespace fuzzing {
// These all return 0 on success; != 0 on failure
int sort (const uint8_t *data, size_t size);
int stable_sort (const uint8_t *data, size_t size);
int partition (const uint8_t *data, size_t size);
int partition_copy (const uint8_t *data, size_t size);
int stable_partition (const uint8_t *data, size_t size);
int unique (const uint8_t *data, size_t size);
int unique_copy (const uint8_t *data, size_t size);
// partition and stable_partition take Bi-Di iterators.
// Should test those, too
int nth_element (const uint8_t *data, size_t size);
int partial_sort (const uint8_t *data, size_t size);
int partial_sort_copy (const uint8_t *data, size_t size);
// Heap operations
int make_heap (const uint8_t *data, size_t size);
int push_heap (const uint8_t *data, size_t size);
int pop_heap (const uint8_t *data, size_t size);
// Various flavors of regex
int regex_ECMAScript (const uint8_t *data, size_t size);
int regex_POSIX (const uint8_t *data, size_t size);
int regex_extended (const uint8_t *data, size_t size);
int regex_awk (const uint8_t *data, size_t size);
int regex_grep (const uint8_t *data, size_t size);
int regex_egrep (const uint8_t *data, size_t size);
// Searching
int search (const uint8_t *data, size_t size);
// int search_boyer_moore (const uint8_t *data, size_t size);
// int search_boyer_moore_horspool (const uint8_t *data, size_t size);
// Set operations
// int includes (const uint8_t *data, size_t size);
// int set_union (const uint8_t *data, size_t size);
// int set_intersection (const uint8_t *data, size_t size);
// int set_difference (const uint8_t *data, size_t size);
// int set_symmetric_difference (const uint8_t *data, size_t size);
// int merge (const uint8_t *data, size_t size);
} // namespace fuzzing
#endif // _LIBCPP_FUZZING