summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/FuzzerLoop.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2015-11-25 21:40:46 +0000
committerKostya Serebryany <kcc@google.com>2015-11-25 21:40:46 +0000
commit2d0ef14f5df702461306592904632345a0d633eb (patch)
tree3b5d5160547925e1c3f75b52e9616ea1a57a50a3 /llvm/lib/Fuzzer/FuzzerLoop.cpp
parent70a134d29f2550588f50563a0a8c56891a70e06f (diff)
downloadbcm5719-llvm-2d0ef14f5df702461306592904632345a0d633eb.tar.gz
bcm5719-llvm-2d0ef14f5df702461306592904632345a0d633eb.zip
[libFuzzer] add a flag -exact_artifact_path
llvm-svn: 254100
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerLoop.cpp')
-rw-r--r--llvm/lib/Fuzzer/FuzzerLoop.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerLoop.cpp b/llvm/lib/Fuzzer/FuzzerLoop.cpp
index 48c1b35dccb..7aea169b7ae 100644
--- a/llvm/lib/Fuzzer/FuzzerLoop.cpp
+++ b/llvm/lib/Fuzzer/FuzzerLoop.cpp
@@ -293,6 +293,8 @@ void Fuzzer::WriteUnitToFileWithPrefix(const Unit &U, const char *Prefix) {
if (!Options.SaveArtifacts)
return;
std::string Path = Options.ArtifactPrefix + Prefix + Hash(U);
+ if (!Options.ExactArtifactPath.empty())
+ Path = Options.ExactArtifactPath; // Overrides ArtifactPrefix.
WriteToFile(U, Path);
Printf("artifact_prefix='%s'; Test unit written to %s\n",
Options.ArtifactPrefix.c_str(), Path.c_str());
OpenPOWER on IntegriCloud