diff options
author | van Hauser <vh@thc.org> | 2020-02-19 09:53:46 +0100 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-02-19 09:53:46 +0100 |
commit | 687b357b2db4155eabaa30195d8d532a6e6b1b62 (patch) | |
tree | 61162e436224b7a6d1f8ae87b06c43cc997b0cc6 /llvm_mode/split-switches-pass.so.cc | |
parent | 3beee6da772f88f1bd7987b4b2e7c56a53ec3270 (diff) | |
download | afl++-687b357b2db4155eabaa30195d8d532a6e6b1b62.tar.gz |
isatty for all compilers + AFL_DEBUG
Diffstat (limited to 'llvm_mode/split-switches-pass.so.cc')
-rw-r--r-- | llvm_mode/split-switches-pass.so.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm_mode/split-switches-pass.so.cc b/llvm_mode/split-switches-pass.so.cc index 9101dc26..70ffe7b6 100644 --- a/llvm_mode/split-switches-pass.so.cc +++ b/llvm_mode/split-switches-pass.so.cc @@ -491,7 +491,7 @@ bool SplitSwitchesTransform::splitSwitches(Module &M) { * less, don't bother with the code below. */ if (!SI->getNumCases() || bitw <= 8) { - if (getenv("AFL_QUIET") == NULL) errs() << "skip trivial switch..\n"; + if (isatty(2) && getenv("AFL_QUIET") == NULL) errs() << "skip trivial switch..\n"; continue; } @@ -556,7 +556,7 @@ bool SplitSwitchesTransform::splitSwitches(Module &M) { bool SplitSwitchesTransform::runOnModule(Module &M) { - if (getenv("AFL_QUIET") == NULL) + if (isatty(2) && getenv("AFL_QUIET") == NULL) llvm::errs() << "Running split-switches-pass by laf.intel@gmail.com\n"; splitSwitches(M); verifyModule(M); |