diff options
author | van Hauser <vh@thc.org> | 2020-03-09 11:08:50 +0100 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-03-09 11:08:50 +0100 |
commit | df74edeb45296ace8c62b7deba985ea3f38201bb (patch) | |
tree | 2b49f763cdca94ddb8418b52f48ad6bcf944c6e3 /llvm_mode/split-compares-pass.so.cc | |
parent | dcf7d85cba9a8ee5a33cff578fe48bdbccda1a3d (diff) | |
download | afl++-df74edeb45296ace8c62b7deba985ea3f38201bb.tar.gz |
more honoring be_quiet
Diffstat (limited to 'llvm_mode/split-compares-pass.so.cc')
-rw-r--r-- | llvm_mode/split-compares-pass.so.cc | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/llvm_mode/split-compares-pass.so.cc b/llvm_mode/split-compares-pass.so.cc index ec301b6a..d296ba3d 100644 --- a/llvm_mode/split-compares-pass.so.cc +++ b/llvm_mode/split-compares-pass.so.cc @@ -106,6 +106,7 @@ class SplitComparesTransform : public ModulePass { protected: std::list<std::string> myWhitelist; + int be_quiet = 0; private: int enableFPSplit; @@ -1244,7 +1245,8 @@ bool SplitComparesTransform::runOnModule(Module &M) { simplifyIntSignedness(M); - if (isatty(2) && getenv("AFL_QUIET") == NULL) { + if ((isatty(2) && getenv("AFL_QUIET") == NULL) || + getenv("AFL_DEBUG") != NULL) { errs() << "Split-compare-pass by laf.intel@gmail.com, extended by " "heiko@hexco.de\n"; @@ -1253,13 +1255,16 @@ bool SplitComparesTransform::runOnModule(Module &M) { errs() << "Split-floatingpoint-compare-pass: " << splitFPCompares(M) << " FP comparisons splitted\n"; - } + } else + + be_quiet = 1; switch (bitw) { case 64: - errs() << "Split-integer-compare-pass " << bitw - << "bit: " << splitIntCompares(M, bitw) << " splitted\n"; + if (!be_quiet) + errs() << "Split-integer-compare-pass " << bitw + << "bit: " << splitIntCompares(M, bitw) << " splitted\n"; bitw >>= 1; #if LLVM_VERSION_MAJOR > 3 || \ @@ -1267,8 +1272,9 @@ bool SplitComparesTransform::runOnModule(Module &M) { [[clang::fallthrough]]; /*FALLTHRU*/ /* FALLTHROUGH */ #endif case 32: - errs() << "Split-integer-compare-pass " << bitw - << "bit: " << splitIntCompares(M, bitw) << " splitted\n"; + if (!be_quiet) + errs() << "Split-integer-compare-pass " << bitw + << "bit: " << splitIntCompares(M, bitw) << " splitted\n"; bitw >>= 1; #if LLVM_VERSION_MAJOR > 3 || \ @@ -1276,14 +1282,15 @@ bool SplitComparesTransform::runOnModule(Module &M) { [[clang::fallthrough]]; /*FALLTHRU*/ /* FALLTHROUGH */ #endif case 16: - errs() << "Split-integer-compare-pass " << bitw - << "bit: " << splitIntCompares(M, bitw) << " splitted\n"; + if (!be_quiet) + errs() << "Split-integer-compare-pass " << bitw + << "bit: " << splitIntCompares(M, bitw) << " splitted\n"; bitw >>= 1; break; default: - errs() << "NOT Running split-compare-pass \n"; + if (!be_quiet) errs() << "NOT Running split-compare-pass \n"; return false; break; |