[llvm] r281124 - [libFuzzer] don't print help for internal flags
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 9 17:35:30 PDT 2016
Author: kcc
Date: Fri Sep 9 19:35:30 2016
New Revision: 281124
URL: http://llvm.org/viewvc/llvm-project?rev=281124&view=rev
Log:
[libFuzzer] don't print help for internal flags
Modified:
llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp
llvm/trunk/lib/Fuzzer/test/fuzzer-flags.test
Modified: llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp?rev=281124&r1=281123&r2=281124&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp (original)
+++ llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp Fri Sep 9 19:35:30 2016
@@ -88,6 +88,7 @@ static void PrintHelp() {
for (size_t F = 0; F < kNumFlags; F++) {
const auto &D = FlagDescriptions[F];
+ if (strstr(D.Description, "internal flag") == D.Description) continue;
Printf(" %s", D.Name);
for (size_t i = 0, n = MaxFlagLen - strlen(D.Name); i < n; i++)
Printf(" ");
Modified: llvm/trunk/lib/Fuzzer/test/fuzzer-flags.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/test/fuzzer-flags.test?rev=281124&r1=281123&r2=281124&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/test/fuzzer-flags.test (original)
+++ llvm/trunk/lib/Fuzzer/test/fuzzer-flags.test Fri Sep 9 19:35:30 2016
@@ -6,3 +6,5 @@ RUN: LLVMFuzzer-SimpleTest -runs=10 --ma
DASH_DASH: WARNING: did you mean '-max_len=100' (single dash)?
DASH_DASH: INFO: A corpus is not provided, starting from an empty corpus
+RUN: LLVMFuzzer-SimpleTest -help=1 2>&1 | FileCheck %s --check-prefix=NO_INTERNAL
+NO_INTERNAL-NOT: internal flag
More information about the llvm-commits
mailing list