LLVM 20.0.0git
Public Member Functions | Static Public Member Functions | List of all members
llvm::IRMutator Class Reference

Entry point for configuring and running IR mutations. More...

#include "llvm/FuzzMutate/IRMutator.h"

Public Member Functions

 IRMutator (std::vector< TypeGetter > &&AllowedTypes, std::vector< std::unique_ptr< IRMutationStrategy > > &&Strategies)
 
void mutateModule (Module &M, int Seed, size_t MaxSize)
 Mutate given module.
 

Static Public Member Functions

static size_t getModuleSize (const Module &M)
 Calculate the size of module as the number of objects in it, i.e.
 

Detailed Description

Entry point for configuring and running IR mutations.

Definition at line 63 of file IRMutator.h.

Constructor & Destructor Documentation

◆ IRMutator()

llvm::IRMutator::IRMutator ( std::vector< TypeGetter > &&  AllowedTypes,
std::vector< std::unique_ptr< IRMutationStrategy > > &&  Strategies 
)
inline

Definition at line 68 of file IRMutator.h.

Member Function Documentation

◆ getModuleSize()

size_t llvm::IRMutator::getModuleSize ( const Module M)
static

Calculate the size of module as the number of objects in it, i.e.

instructions, basic blocks, functions, and aliases.

Parameters
Mmodule
Returns
number of objects in module

Definition at line 60 of file IRMutator.cpp.

Referenced by mutateModule().

◆ mutateModule()

void IRMutator::mutateModule ( Module M,
int  Seed,
size_t  MaxSize 
)

Mutate given module.

No change will be made if no strategy is selected.

Parameters
Mmodule to mutate
Seedseed for random mutation
MaxSizemax module size (see getModuleSize)

Definition at line 64 of file IRMutator.cpp.

References getModuleSize(), and Seed.


The documentation for this class was generated from the following files: