summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/FuzzerDriver.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2015-10-22 21:48:09 +0000
committerKostya Serebryany <kcc@google.com>2015-10-22 21:48:09 +0000
commitb36025619ce9aa74c6f39da0cd36d1137f945ad4 (patch)
tree21dc39032fe2991a136beed592eaf0314a518229 /llvm/lib/Fuzzer/FuzzerDriver.cpp
parent8a598f89ad7fa6885e3c06812bea1fecbaaf586f (diff)
downloadbcm5719-llvm-b36025619ce9aa74c6f39da0cd36d1137f945ad4.tar.gz
bcm5719-llvm-b36025619ce9aa74c6f39da0cd36d1137f945ad4.zip
[libFuzzer] remove the deprecated 'tokens' feature
llvm-svn: 251069
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerDriver.cpp')
-rw-r--r--llvm/lib/Fuzzer/FuzzerDriver.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerDriver.cpp b/llvm/lib/Fuzzer/FuzzerDriver.cpp
index d73e351d649..4543d81cb1e 100644
--- a/llvm/lib/Fuzzer/FuzzerDriver.cpp
+++ b/llvm/lib/Fuzzer/FuzzerDriver.cpp
@@ -182,26 +182,6 @@ static int RunInMultipleProcesses(const std::vector<std::string> &Args,
return HasErrors ? 1 : 0;
}
-std::vector<std::string> ReadTokensFile(const char *TokensFilePath) {
- if (!TokensFilePath) return {};
- std::string TokensFileContents = FileToString(TokensFilePath);
- std::istringstream ISS(TokensFileContents);
- std::vector<std::string> Res = {std::istream_iterator<std::string>{ISS},
- std::istream_iterator<std::string>{}};
- Res.push_back(" ");
- Res.push_back("\t");
- Res.push_back("\n");
- return Res;
-}
-
-int ApplyTokens(const Fuzzer &F, const char *InputFilePath) {
- Unit U = FileToVector(InputFilePath);
- auto T = F.SubstituteTokens(U);
- T.push_back(0);
- Printf("%s", T.data());
- return 0;
-}
-
int RunOneTest(Fuzzer *F, const char *InputFilePath) {
Unit U = FileToVector(InputFilePath);
F->ExecuteCallback(U);
@@ -258,7 +238,6 @@ int FuzzerDriver(const std::vector<std::string> &Args,
Options.ShuffleAtStartUp = Flags.shuffle;
Options.PreferSmallDuringInitialShuffle =
Flags.prefer_small_during_initial_shuffle;
- Options.Tokens = ReadTokensFile(Flags.deprecated_tokens);
Options.Reload = Flags.reload;
Options.OnlyASCII = Flags.only_ascii;
Options.TBMDepth = Flags.tbm_depth;
@@ -282,9 +261,6 @@ int FuzzerDriver(const std::vector<std::string> &Args,
Fuzzer F(USF, Options);
- if (Flags.apply_tokens)
- return ApplyTokens(F, Flags.apply_tokens);
-
// Timer
if (Flags.timeout > 0)
SetTimer(Flags.timeout / 2 + 1);
@@ -300,13 +276,6 @@ int FuzzerDriver(const std::vector<std::string> &Args,
Printf("Seed: %u\n", Seed);
USF.GetRand().ResetSeed(Seed);
- if (Flags.verbosity >= 2) {
- Printf("Tokens: {");
- for (auto &T : Options.Tokens)
- Printf("%s,", T.c_str());
- Printf("}\n");
- }
-
F.RereadOutputCorpus();
for (auto &inp : *Inputs)
if (inp != Options.OutputCorpus)
OpenPOWER on IntegriCloud