LLVM: llvm::fuzzerop::SourcePred Class Reference (original) (raw)
A matcher/generator for finding suitable values for the next source in an operation's partially completed argument list. More...
#include "[llvm/FuzzMutate/OpDescriptor.h](OpDescriptor%5F8h%5Fsource.html)"
| Public Types | |
|---|---|
| using | PredT = std::function<bool(ArrayRef<Value *> Cur, const Value *New)> |
| Given a list of already selected operands, returns whether a given new operand is suitable for the next operand. | |
| using | MakeT |
| Given a list of already selected operands and a set of valid base types for a fuzzer, generates a list of constants that could be used for the next operand. |
| Public Member Functions | |
|---|---|
| SourcePred (PredT Pred, MakeT Make) | |
| Create a fully general source predicate. | |
| SourcePred (PredT Pred, std::nullopt_t) | |
| bool | matches (ArrayRef< Value * > Cur, const Value *New) |
| Returns true if New is compatible for the argument after Cur. | |
| std::vector< Constant * > | generate (ArrayRef< Value * > Cur, ArrayRef< Type * > BaseTypes) |
| Generates a list of potential values for the argument after Cur. |
A matcher/generator for finding suitable values for the next source in an operation's partially completed argument list.
Given that we're building some operation X and may have already filled some subset of its operands, this predicate determines if some value New is suitable for the next operand or generates a set of values that are suitable.
Definition at line 44 of file OpDescriptor.h.
◆ MakeT
Initial value:
std::function<std::vector<Constant *>(
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Given a list of already selected operands and a set of valid base types for a fuzzer, generates a list of constants that could be used for the next operand.
Definition at line 52 of file OpDescriptor.h.
◆ PredT
Given a list of already selected operands, returns whether a given new operand is suitable for the next operand.
Definition at line 48 of file OpDescriptor.h.
| llvm::fuzzerop::SourcePred::SourcePred ( PredT Pred, MakeT Make ) | inline |
|---|
Create a fully general source predicate.
Definition at line 61 of file OpDescriptor.h.
◆ SourcePred() [2/2]
| llvm::fuzzerop::SourcePred::SourcePred ( PredT Pred, std::nullopt_t ) | inline |
|---|
◆ generate()
Generates a list of potential values for the argument after Cur.
Definition at line 83 of file OpDescriptor.h.
◆ matches()
Returns true if New is compatible for the argument after Cur.
Definition at line 78 of file OpDescriptor.h.
The documentation for this class was generated from the following file:
- include/llvm/FuzzMutate/OpDescriptor.h