#include "handle_llvm.h"
#include "input_arrays.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/CodeGen/CommandFlags.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/ExecutionEngine/JITEventListener.h"
#include "llvm/ExecutionEngine/JITSymbol.h"
#include "llvm/ExecutionEngine/MCJIT.h"
#include "llvm/ExecutionEngine/ObjectCache.h"
#include "llvm/ExecutionEngine/RTDyldMemoryManager.h"
#include "llvm/ExecutionEngine/SectionMemoryManager.h"
#include "llvm/IR/IRPrintingPasses.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Verifier.h"
#include "llvm/IRPrinter/IRPrintingPasses.h"
#include "llvm/IRReader/IRReader.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Passes/OptimizationLevel.h"
#include "llvm/Passes/PassBuilder.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/TargetParser/Triple.h"
usingnamespacellvm;
LLVMFunc;
static CodeGenOptLevel getOptLevel(const std::vector<const char *> &ExtraArgs) { … }
static void ErrorAndExit(std::string message) { … }
static void RunOptimizationPasses(raw_ostream &OS, Module &M,
CodeGenOptLevel OptLevel) { … }
static std::string OptLLVM(const std::string &IR, CodeGenOptLevel OLvl) { … }
static void RunFuncOnInputs(LLVMFunc f, int Arr[kNumArrays][kArraySize]) { … }
static void CreateAndRunJITFunc(const std::string &IR, CodeGenOptLevel OLvl) { … }
void clang_fuzzer::HandleLLVM(const std::string &IR,
const std::vector<const char *> &ExtraArgs) { … }