mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-17 04:18:06 +00:00
code format
This commit is contained in:
@ -62,12 +62,14 @@ namespace {
|
|||||||
|
|
||||||
#if LLVM_MAJOR >= 11 /* use new pass manager */
|
#if LLVM_MAJOR >= 11 /* use new pass manager */
|
||||||
class CmpLogInstructions : public PassInfoMixin<CmpLogInstructions> {
|
class CmpLogInstructions : public PassInfoMixin<CmpLogInstructions> {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CmpLogInstructions() {
|
CmpLogInstructions() {
|
||||||
|
|
||||||
initInstrumentList();
|
initInstrumentList();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
class CmpLogInstructions : public ModulePass {
|
class CmpLogInstructions : public ModulePass {
|
||||||
|
|
||||||
@ -78,6 +80,7 @@ class CmpLogInstructions : public ModulePass {
|
|||||||
initInstrumentList();
|
initInstrumentList();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LLVM_MAJOR >= 11 /* use new pass manager */
|
#if LLVM_MAJOR >= 11 /* use new pass manager */
|
||||||
@ -95,6 +98,7 @@ class CmpLogInstructions : public ModulePass {
|
|||||||
return "cmplog instructions";
|
return "cmplog instructions";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -637,8 +641,10 @@ bool CmpLogInstructions::hookInstrs(Module &M) {
|
|||||||
#if LLVM_MAJOR >= 11 /* use new pass manager */
|
#if LLVM_MAJOR >= 11 /* use new pass manager */
|
||||||
PreservedAnalyses CmpLogInstructions::run(Module & M,
|
PreservedAnalyses CmpLogInstructions::run(Module & M,
|
||||||
ModuleAnalysisManager &MAM) {
|
ModuleAnalysisManager &MAM) {
|
||||||
|
|
||||||
#else
|
#else
|
||||||
bool CmpLogInstructions::runOnModule(Module &M) {
|
bool CmpLogInstructions::runOnModule(Module &M) {
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (getenv("AFL_QUIET") == NULL)
|
if (getenv("AFL_QUIET") == NULL)
|
||||||
@ -677,3 +683,4 @@ static RegisterStandardPasses RegisterCmpLogInstructionsPassLTO(
|
|||||||
registerCmpLogInstructionsPass);
|
registerCmpLogInstructionsPass);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -86,6 +86,7 @@ class CompareTransform : public ModulePass {
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
const char *getPassName() const override {
|
const char *getPassName() const override {
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -684,8 +684,8 @@ static void edit_params(u32 argc, char **argv, char **envp) {
|
|||||||
|
|
||||||
#if LLVM_MAJOR >= 11
|
#if LLVM_MAJOR >= 11
|
||||||
cc_params[cc_par_cnt++] = "-fexperimental-new-pass-manager";
|
cc_params[cc_par_cnt++] = "-fexperimental-new-pass-manager";
|
||||||
cc_params[cc_par_cnt++] =
|
cc_params[cc_par_cnt++] = alloc_printf(
|
||||||
alloc_printf("-fpass-plugin=%s/cmplog-instructions-pass.so", obj_path);
|
"-fpass-plugin=%s/cmplog-instructions-pass.so", obj_path);
|
||||||
#else
|
#else
|
||||||
cc_params[cc_par_cnt++] = "-Xclang";
|
cc_params[cc_par_cnt++] = "-Xclang";
|
||||||
cc_params[cc_par_cnt++] = "-load";
|
cc_params[cc_par_cnt++] = "-load";
|
||||||
|
Reference in New Issue
Block a user