remove new llvm pass manager :(
MODIFY
instrumentation/afl-llvm-dict2file.so.cc
instrumentation/afl-llvm-dict2file.so.cc
@@ -589,6 +589,7 @@ bool AFLdict2filePass::runOnModule(Module &M) {
if (optLen < 2) { continue; }
if (literalLength + 1 == optLen) { // add null byte
+
thestring.append("\0", 1);
}
@@ -611,17 +612,11 @@ bool AFLdict2filePass::runOnModule(Module &M) {
}
*/
-
- if (!isStdString) {
+ if (!isStdString && thestring.find('\0', 0) != std::string::npos) {
// ensure we do not have garbage
size_t offset = thestring.find('\0', 0);
- if (offset && offset < optLen && offset + 1 < optLen) {
-
- optLen = offset + 1;
-
- }
-
+ if (offset + 1 < optLen) optLen = offset + 1;
thestring = thestring.substr(0, optLen);
}

MODIFY
instrumentation/afl-llvm-pass.so.cc
instrumentation/afl-llvm-pass.so.cc
@@ -45,21 +45,12 @@ typedef long double max_align_t;
#endif
#include "llvm/IR/IRBuilder.h"
-#if LLVM_VERSION_MAJOR >= 11 /* use new pass manager */
- #include "llvm/Passes/PassPlugin.h"
- #include "llvm/Passes/PassBuilder.h"
- #include "llvm/IR/PassManager.h"
-#else
#include "llvm/IR/LegacyPassManager.h"
- #include "llvm/Transforms/IPO/PassManagerBuilder.h"
-#endif
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/MathExtras.h"
-#if LLVM_VERSION_MAJOR >= 14 /* how about stable interfaces? */
- #include "llvm/Passes/OptimizationLevel.h"
-#endif
+#include "llvm/Transforms/IPO/PassManagerBuilder.h"
#if LLVM_VERSION_MAJOR > 3 || \
(LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR > 4)
@@ -77,30 +68,17 @@ using namespace llvm;
namespace {
-#if LLVM_VERSION_MAJOR >= 11 /* use new pass manager */
-class AFLCoverage : public PassInfoMixin<AFLCoverage> {
-
- public:
- AFLCoverage() {
-
-#else
class AFLCoverage : public ModulePass {
public:
static char ID;
AFLCoverage() : ModulePass(ID) {
-#endif
-
initInstrumentList();
}
-#if LLVM_VERSION_MAJOR >= 11 /* use new pass manager */
- PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM);
-#else
bool runOnModule(Module &M) override;
-#endif
protected:
uint32_t ngram_size = 0;
@@ -114,55 +92,7 @@ class AFLCoverage : public ModulePass {
} // namespace
-#if LLVM_VERSION_MAJOR >= 11 /* use new pass manager */
-extern "C" ::llvm::PassPluginLibraryInfo LLVM_ATTRIBUTE_WEAK
-llvmGetPassPluginInfo() {
-
- return {LLVM_PLUGIN_API_VERSION, "AFLCoverage", "v0.1",
- /* lambda to insert our pass into the pass pipeline. */
- [](PassBuilder &PB) {
-
- #if 1
- #if LLVM_VERSION_MAJOR <= 13
- using OptimizationLevel = typename PassBuilder::OptimizationLevel;
- #endif
- PB.registerOptimizerLastEPCallback(
- [](ModulePassManager &MPM, OptimizationLevel OL) {
-
- MPM.addPass(AFLCoverage());
-
- });
-
- /* TODO LTO registration */
- #else
- using PipelineElement = typename PassBuilder::PipelineElement;
- PB.registerPipelineParsingCallback([](StringRef Name,
- ModulePassManager &MPM,
- ArrayRef<PipelineElement>) {
-
- if (Name == "AFLCoverage") {
-
- MPM.addPass(AFLCoverage());
- return true;
-
- } else {
-
- return false;
-
- }
-
- });
-
- #endif
-
- }};
-
-}
-
-#else
-
char AFLCoverage::ID = 0;
-#endif
/* needed up to 3.9.0 */
#if LLVM_VERSION_MAJOR == 3 && \
@@ -188,15 +118,8 @@ uint64_t PowerOf2Ceil(unsigned in) {
(LLVM_VERSION_MAJOR == 4 && LLVM_VERSION_PATCH >= 1)
#define AFL_HAVE_VECTOR_INTRINSICS 1
#endif
-
-#if LLVM_VERSION_MAJOR >= 11 /* use new pass manager */
-PreservedAnalyses AFLCoverage::run(Module &M, ModuleAnalysisManager &MAM) {
-
-#else
bool AFLCoverage::runOnModule(Module &M) {
-#endif
-
LLVMContext &C = M.getContext();
IntegerType *Int8Ty = IntegerType::getInt8Ty(C);
@@ -210,10 +133,6 @@ bool AFLCoverage::runOnModule(Module &M) {
u32 rand_seed;
unsigned int cur_loc = 0;
-#if LLVM_VERSION_MAJOR >= 11 /* use new pass manager */
- auto PA = PreservedAnalyses::all();
-#endif
-
/* Setup random() so we get Actually Random(TM) outputs from AFL_R() */
gettimeofday(&tv, &tz);
rand_seed = tv.tv_sec ^ tv.tv_usec ^ getpid();
@@ -1051,15 +970,10 @@ bool AFLCoverage::runOnModule(Module &M) {
}
-#if LLVM_VERSION_MAJOR >= 11 /* use new pass manager */
- return PA;
-#else
return true;
-#endif
}
-#if LLVM_VERSION_MAJOR < 11 /* use old pass manager */
static void registerAFLPass(const PassManagerBuilder &,
legacy::PassManagerBase &PM) {
@@ -1072,5 +986,4 @@ static RegisterStandardPasses RegisterAFLPass(
static RegisterStandardPasses RegisterAFLPass0(
PassManagerBuilder::EP_EnabledOnOptLevel0, registerAFLPass);
-#endif

MODIFY
instrumentation/cmplog-instructions-pass.cc
instrumentation/cmplog-instructions-pass.cc
#include "llvm/Config/llvm-config.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/IR/IRBuilder.h"
+#include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
-#if LLVM_MAJOR >= 11
-// #include "llvm/Passes/PassPlugin.h"
-// #include "llvm/Passes/PassBuilder.h"
- #include "llvm/IR/PassManager.h"
-#else
- #include "llvm/IR/LegacyPassManager.h"
-#endif
+#include "llvm/Transforms/IPO/PassManagerBuilder.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Pass.h"
#include "llvm/Analysis/ValueTracking.h"
@@ -59,15 +54,6 @@ using namespace llvm;
namespace {
-#if LLVM_MAJOR >= 11 /* use new pass manager */
-class CmpLogInstructions : public PassInfoMixin<CmpLogInstructions> {
- public:
- CmpLogInstructions() {
-
- initInstrumentList();
-
- }
-#else
class CmpLogInstructions : public ModulePass {
public:
@@ -77,11 +63,7 @@ class CmpLogInstructions : public ModulePass {
initInstrumentList();
}
-#endif
-#if LLVM_MAJOR >= 11 /* use new pass manager */
- PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM);
-#else
bool runOnModule(Module &M) override;
#if LLVM_VERSION_MAJOR < 4
@@ -94,7 +76,6 @@ class CmpLogInstructions : public ModulePass {
return "cmplog instructions";
}
-#endif
private:
bool hookInstrs(Module &M);
@@ -103,9 +84,7 @@ class CmpLogInstructions : public ModulePass {
} // namespace
-#if LLVM_MAJOR <= 10 /* use old pass manager */
char CmpLogInstructions::ID = 0;
-#endif
template <class Iterator>
Iterator Unique(Iterator first, Iterator last) {
@@ -588,12 +567,7 @@ bool CmpLogInstructions::hookInstrs(Module &M) {
}
-#if LLVM_MAJOR >= 11 /* use new pass manager */
-PreservedAnalyses CmpLogInstructions::run(Module & M,
- ModuleAnalysisManager &MAM) {
-#else
bool CmpLogInstructions::runOnModule(Module &M) {
-#endif
if (getenv("AFL_QUIET") == NULL)
printf("Running cmplog-instructions-pass by andreafioraldi@gmail.com\n");
@@ -602,15 +576,10 @@ bool CmpLogInstructions::runOnModule(Module &M) {
hookInstrs(M);
verifyModule(M);
-#if LLVM_MAJOR >= 11 /* use new pass manager */
- return PreservedAnalyses::all();
-#else
return true;
-#endif
}
-#if LLVM_MAJOR < 11 /* use old pass manager */
static void registerCmpLogInstructionsPass(const PassManagerBuilder &,
legacy::PassManagerBase &PM) {
@@ -630,4 +599,4 @@ static RegisterStandardPasses RegisterCmpLogInstructionsPassLTO(
PassManagerBuilder::EP_FullLinkTimeOptimizationLast,
registerCmpLogInstructionsPass);
#endif
-#endif
+

MODIFY
instrumentation/compare-transform-pass.so.cc
instrumentation/compare-transform-pass.so.cc
#include "llvm/ADT/Statistic.h"
#include "llvm/IR/IRBuilder.h"
-#if LLVM_MAJOR >= 11 /* use new pass manager */
- #include "llvm/Passes/PassPlugin.h"
- #include "llvm/Passes/PassBuilder.h"
- #include "llvm/IR/PassManager.h"
-#else
#include "llvm/IR/LegacyPassManager.h"
- #include "llvm/Transforms/IPO/PassManagerBuilder.h"
-#endif
#include "llvm/IR/Module.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
+#include "llvm/Transforms/IPO/PassManagerBuilder.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Pass.h"
#include "llvm/Analysis/ValueTracking.h"
-#if LLVM_VERSION_MAJOR >= 14 /* how about stable interfaces? */
- #include "llvm/Passes/OptimizationLevel.h"
-#endif
#if LLVM_VERSION_MAJOR > 3 || \
(LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR > 4)
@@ -61,30 +52,28 @@ using namespace llvm;
namespace {
-#if LLVM_MAJOR >= 11 /* use new pass manager */
-class CompareTransform : public PassInfoMixin<CompareTransform> {
-
- public:
- CompareTransform() {
-
-#else
class CompareTransform : public ModulePass {
public:
static char ID;
CompareTransform() : ModulePass(ID) {
-#endif
-
initInstrumentList();
}
-#if LLVM_MAJOR >= 11 /* use new pass manager */
- PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM);
-#else
bool runOnModule(Module &M) override;
+
+#if LLVM_VERSION_MAJOR < 4
+ const char *getPassName() const override {
+
+#else
+ StringRef getPassName() const override {
+
#endif
+ return "transforms compare functions";
+
+ }
private:
bool transformCmps(Module &M, const bool processStrcmp,
@@ -96,54 +85,7 @@ class CompareTransform : public ModulePass {
} // namespace
-#if LLVM_MAJOR >= 11 /* use new pass manager */
-extern "C" ::llvm::PassPluginLibraryInfo LLVM_ATTRIBUTE_WEAK
-llvmGetPassPluginInfo() {
-
- return {LLVM_PLUGIN_API_VERSION, "comparetransform", "v0.1",
- /* lambda to insert our pass into the pass pipeline. */
- [](PassBuilder &PB) {
-
- #if 1
- #if LLVM_VERSION_MAJOR <= 13
- using OptimizationLevel = typename PassBuilder::OptimizationLevel;
- #endif
- PB.registerOptimizerLastEPCallback(
- [](ModulePassManager &MPM, OptimizationLevel OL) {
-
- MPM.addPass(CompareTransform());
-
- });
-
- /* TODO LTO registration */
- #else
- using PipelineElement = typename PassBuilder::PipelineElement;
- PB.registerPipelineParsingCallback([](StringRef Name,
- ModulePassManager &MPM,
- ArrayRef<PipelineElement>) {
-
- if (Name == "comparetransform") {
-
- MPM.addPass(CompareTransform());
- return true;
-
- } else {
-
- return false;
-
- }
-
- });
-
- #endif
-
- }};
-
-}
-
-#else
char CompareTransform::ID = 0;
-#endif
bool CompareTransform::transformCmps(Module &M, const bool processStrcmp,
const bool processMemcmp,
@@ -442,7 +384,6 @@ bool CompareTransform::transformCmps(Module &M, const bool processStrcmp,
bool isSizedcmp = false;
bool isCaseInsensitive = false;
Function * Callee = callInst->getCalledFunction();
-
if (Callee) {
isMemcmp = Callee->getName().compare("memcmp") == 0;
@@ -507,6 +448,7 @@ bool CompareTransform::transformCmps(Module &M, const bool processStrcmp,
// the following is in general OK, but strncmp is sometimes used in binary
// data structures and this can result in crashes :( so it is commented out
/*
+
// add null termination character implicit in c strings
if (!isMemcmp && TmpConstStr[TmpConstStr.length() - 1]) {
@@ -656,14 +598,8 @@ bool CompareTransform::transformCmps(Module &M, const bool processStrcmp,
}
-#if LLVM_MAJOR >= 11 /* use new pass manager */
-PreservedAnalyses CompareTransform::run(Module &M, ModuleAnalysisManager &MAM) {
-
-#else
bool CompareTransform::runOnModule(Module &M) {
-#endif
-
if ((isatty(2) && getenv("AFL_QUIET") == NULL) || getenv("AFL_DEBUG") != NULL)
printf(
"Running compare-transform-pass by laf.intel@gmail.com, extended by "
@@ -671,28 +607,13 @@ bool CompareTransform::runOnModule(Module &M) {
else
be_quiet = 1;
-#if LLVM_MAJOR >= 11 /* use new pass manager */
- auto PA = PreservedAnalyses::all();
-#endif
-
transformCmps(M, true, true, true, true, true);
verifyModule(M);
-#if LLVM_MAJOR >= 11 /* use new pass manager */
- /* if (modified) {
-
- PA.abandon<XX_Manager>();
-
- }*/
-
- return PA;
-#else
return true;
-#endif
}
-#if LLVM_MAJOR < 11 /* use old pass manager */
static void registerCompTransPass(const PassManagerBuilder &,
legacy::PassManagerBase &PM) {
@@ -711,5 +632,4 @@ static RegisterStandardPasses RegisterCompTransPass0(
static RegisterStandardPasses RegisterCompTransPassLTO(
PassManagerBuilder::EP_FullLinkTimeOptimizationLast, registerCompTransPass);
#endif
-#endif

MODIFY
instrumentation/split-switches-pass.so.cc
instrumentation/split-switches-pass.so.cc
#include "llvm/ADT/Statistic.h"
#include "llvm/IR/IRBuilder.h"
-#if LLVM_VERSION_MAJOR >= 11 /* use new pass manager */
- #include "llvm/Passes/PassPlugin.h"
- #include "llvm/Passes/PassBuilder.h"
- #include "llvm/IR/PassManager.h"
-#else
#include "llvm/IR/LegacyPassManager.h"
- #include "llvm/Transforms/IPO/PassManagerBuilder.h"
-#endif
#include "llvm/IR/Module.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
+#include "llvm/Transforms/IPO/PassManagerBuilder.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Pass.h"
#include "llvm/Analysis/ValueTracking.h"
-#if LLVM_VERSION_MAJOR >= 14 /* how about stable interfaces? */
- #include "llvm/Passes/OptimizationLevel.h"
-#endif
#include "llvm/IR/IRBuilder.h"
#if LLVM_VERSION_MAJOR > 3 || \
@@ -63,27 +54,16 @@ using namespace llvm;
namespace {
-#if LLVM_VERSION_MAJOR >= 11 /* use new pass manager */
-class SplitSwitchesTransform : public PassInfoMixin<SplitSwitchesTransform> {
-
- public:
- SplitSwitchesTransform() {
-
-#else
class SplitSwitchesTransform : public ModulePass {
public:
static char ID;
SplitSwitchesTransform() : ModulePass(ID) {
-#endif
initInstrumentList();
}
-#if LLVM_VERSION_MAJOR >= 11 /* use new pass manager */
- PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM);
-#else
bool runOnModule(Module &M) override;
#if LLVM_VERSION_MAJOR >= 4
@@ -97,8 +77,6 @@ class SplitSwitchesTransform : public ModulePass {
}
-#endif
-
struct CaseExpr {
ConstantInt *Val;
@@ -125,54 +103,7 @@ class SplitSwitchesTransform : public ModulePass {
} // namespace
-#if LLVM_VERSION_MAJOR >= 11 /* use new pass manager */
-extern "C" ::llvm::PassPluginLibraryInfo LLVM_ATTRIBUTE_WEAK
-llvmGetPassPluginInfo() {
-
- return {LLVM_PLUGIN_API_VERSION, "splitswitches", "v0.1",
- /* lambda to insert our pass into the pass pipeline. */
- [](PassBuilder &PB) {
-
- #if 1
- #if LLVM_VERSION_MAJOR <= 13
- using OptimizationLevel = typename PassBuilder::OptimizationLevel;
- #endif
- PB.registerOptimizerLastEPCallback(
- [](ModulePassManager &MPM, OptimizationLevel OL) {
-
- MPM.addPass(SplitSwitchesTransform());
-
- });
-
- /* TODO LTO registration */
- #else
- using PipelineElement = typename PassBuilder::PipelineElement;
- PB.registerPipelineParsingCallback([](StringRef Name,
- ModulePassManager &MPM,
- ArrayRef<PipelineElement>) {
-
- if (Name == "splitswitches") {
-
- MPM.addPass(SplitSwitchesTransform());
- return true;
-
- } else {
-
- return false;
-
- }
-
- });
-
- #endif
-
- }};
-
-}
-
-#else
char SplitSwitchesTransform::ID = 0;
-#endif
/* switchConvert - Transform simple list of Cases into list of CaseRange's */
BasicBlock *SplitSwitchesTransform::switchConvert(
@@ -484,42 +415,19 @@ bool SplitSwitchesTransform::splitSwitches(Module &M) {
}
-#if LLVM_VERSION_MAJOR >= 11 /* use new pass manager */
-PreservedAnalyses SplitSwitchesTransform::run(Module & M,
- ModuleAnalysisManager &MAM) {
-
-#else
bool SplitSwitchesTransform::runOnModule(Module &M) {
-#endif
-
if ((isatty(2) && getenv("AFL_QUIET") == NULL) || getenv("AFL_DEBUG") != NULL)
printf("Running split-switches-pass by laf.intel@gmail.com\n");
else
be_quiet = 1;
-
-#if LLVM_VERSION_MAJOR >= 11 /* use new pass manager */
- auto PA = PreservedAnalyses::all();
-#endif
-
splitSwitches(M);
verifyModule(M);
-#if LLVM_VERSION_MAJOR >= 11 /* use new pass manager */
- /* if (modified) {
-
- PA.abandon<XX_Manager>();
-
- }*/
-
- return PA;
-#else
return true;
-#endif
}
-#if LLVM_VERSION_MAJOR < 11 /* use old pass manager */
static void registerSplitSwitchesTransPass(const PassManagerBuilder &,
legacy::PassManagerBase &PM) {
@@ -539,5 +447,4 @@ static RegisterStandardPasses RegisterSplitSwitchesTransPassLTO(
PassManagerBuilder::EP_FullLinkTimeOptimizationLast,
registerSplitSwitchesTransPass);
#endif
-#endif

MODIFY
qemu_mode/qemuafl
qemu_mode/qemuafl
-Subproject commit 8809a2b2ebf089d3427dd8f6a0044bcc2e13b389
+Subproject commit 002e473939a350854d56f67ce7b2e2d9706b8bca

MODIFY
src/afl-cc.c
src/afl-cc.c
@@ -462,17 +462,11 @@ static void edit_params(u32 argc, char **argv, char **envp) {
} else {
-#if LLVM_MAJOR >= 11 /* use new pass manager */
- cc_params[cc_par_cnt++] = "-fexperimental-new-pass-manager";
- cc_params[cc_par_cnt++] =
- alloc_printf("-fpass-plugin=%s/split-switches-pass.so", obj_path);
-#else
cc_params[cc_par_cnt++] = "-Xclang";
cc_params[cc_par_cnt++] = "-load";
cc_params[cc_par_cnt++] = "-Xclang";
cc_params[cc_par_cnt++] =
alloc_printf("%s/split-switches-pass.so", obj_path);
-#endif
}
@@ -488,17 +482,11 @@ static void edit_params(u32 argc, char **argv, char **envp) {
} else {
-#if LLVM_MAJOR >= 11 /* use new pass manager */
- cc_params[cc_par_cnt++] = "-fexperimental-new-pass-manager";
- cc_params[cc_par_cnt++] = alloc_printf(
- "-fpass-plugin=%s/compare-transform-pass.so", obj_path);
-#else
cc_params[cc_par_cnt++] = "-Xclang";
cc_params[cc_par_cnt++] = "-load";
cc_params[cc_par_cnt++] = "-Xclang";
cc_params[cc_par_cnt++] =
alloc_printf("%s/compare-transform-pass.so", obj_path);
-#endif
}
@@ -514,18 +502,11 @@ static void edit_params(u32 argc, char **argv, char **envp) {
} else {
-#if LLVM_MAJOR >= 11
- cc_params[cc_par_cnt++] = "-fexperimental-new-pass-manager";
- cc_params[cc_par_cnt++] =
- alloc_printf("-fpass-plugin=%s/split-compares-pass.so", obj_path);
-// cc_params[cc_par_cnt++] = "-fno-experimental-new-pass-manager";
-#else
cc_params[cc_par_cnt++] = "-Xclang";
cc_params[cc_par_cnt++] = "-load";
cc_params[cc_par_cnt++] = "-Xclang";
cc_params[cc_par_cnt++] =
alloc_printf("%s/split-compares-pass.so", obj_path);
-#endif
}
@@ -555,17 +536,11 @@ static void edit_params(u32 argc, char **argv, char **envp) {
alloc_printf("%s/cmplog-switches-pass.so", obj_path);
// reuse split switches from laf
-#if LLVM_MAJOR >= 11
- cc_params[cc_par_cnt++] = "-fexperimental-new-pass-manager";
- cc_params[cc_par_cnt++] =
- alloc_printf("-fpass-plugin=%s/split-switches-pass.so", obj_path);
-#else
cc_params[cc_par_cnt++] = "-Xclang";
cc_params[cc_par_cnt++] = "-load";
cc_params[cc_par_cnt++] = "-Xclang";
cc_params[cc_par_cnt++] =
alloc_printf("%s/split-switches-pass.so", obj_path);
-#endif
}
@@ -573,6 +548,10 @@ static void edit_params(u32 argc, char **argv, char **envp) {
}
+#if LLVM_MAJOR >= 13
+ // fuck you llvm 13
+ cc_params[cc_par_cnt++] = "-fno-experimental-new-pass-manager";
+#endif
if (lto_mode && !have_c) {
@@ -612,7 +591,6 @@ static void edit_params(u32 argc, char **argv, char **envp) {
} else {
- cc_params[cc_par_cnt++] = "-fno-experimental-new-pass-manager";
cc_params[cc_par_cnt++] = "-Xclang";
cc_params[cc_par_cnt++] = "-load";
cc_params[cc_par_cnt++] = "-Xclang";
@@ -645,16 +623,10 @@ static void edit_params(u32 argc, char **argv, char **envp) {
} else {
-#if LLVM_MAJOR >= 11
- cc_params[cc_par_cnt++] = "-fexperimental-new-pass-manager";
- cc_params[cc_par_cnt++] =
- alloc_printf("-fpass-plugin=%s/afl-llvm-pass.so", obj_path);
-#else
cc_params[cc_par_cnt++] = "-Xclang";
cc_params[cc_par_cnt++] = "-load";
cc_params[cc_par_cnt++] = "-Xclang";
cc_params[cc_par_cnt++] = alloc_printf("%s/afl-llvm-pass.so", obj_path);
-#endif
}
@@ -671,17 +643,11 @@ static void edit_params(u32 argc, char **argv, char **envp) {
} else {
-#if LLVM_MAJOR >= 11
- cc_params[cc_par_cnt++] = "-fexperimental-new-pass-manager";
- cc_params[cc_par_cnt++] =
- alloc_printf("-fpass-plugin=%s/cmplog-instructions-pass.so", obj_path);
-#else
cc_params[cc_par_cnt++] = "-Xclang";
cc_params[cc_par_cnt++] = "-load";
cc_params[cc_par_cnt++] = "-Xclang";
cc_params[cc_par_cnt++] =
alloc_printf("%s/cmplog-instructions-pass.so", obj_path);
-#endif
cc_params[cc_par_cnt++] = "-Xclang";
cc_params[cc_par_cnt++] = "-load";

remove new llvm pass manager :(