summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/FuzzerLoop.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2015-10-09 03:57:59 +0000
committerKostya Serebryany <kcc@google.com>2015-10-09 03:57:59 +0000
commitbd5d1cdbb958a3a5a0484411b10fd6c8cdf5f132 (patch)
tree05c9eb3a43ca0e922b4ec45816556b2c0b737575 /llvm/lib/Fuzzer/FuzzerLoop.cpp
parent6ec5d61bdae112ef079f1c101bd50a26ffaeb0d3 (diff)
downloadbcm5719-llvm-bd5d1cdbb958a3a5a0484411b10fd6c8cdf5f132.tar.gz
bcm5719-llvm-bd5d1cdbb958a3a5a0484411b10fd6c8cdf5f132.zip
[libFuzzer] add -artifact_prefix flag
llvm-svn: 249807
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerLoop.cpp')
-rw-r--r--llvm/lib/Fuzzer/FuzzerLoop.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerLoop.cpp b/llvm/lib/Fuzzer/FuzzerLoop.cpp
index bfeed1ab21e..76f65deb249 100644
--- a/llvm/lib/Fuzzer/FuzzerLoop.cpp
+++ b/llvm/lib/Fuzzer/FuzzerLoop.cpp
@@ -236,9 +236,10 @@ void Fuzzer::WriteToOutputCorpus(const Unit &U) {
}
void Fuzzer::WriteUnitToFileWithPrefix(const Unit &U, const char *Prefix) {
- std::string Path = Prefix + Hash(U);
+ std::string Path = Options.ArtifactPrefix + Prefix + Hash(U);
WriteToFile(U, Path);
- Printf("Test unit written to %s\n", Path.c_str());
+ Printf("artifact_prefix='%s'; Test unit written to %s\n",
+ Options.ArtifactPrefix.c_str(), Path.c_str());
if (U.size() <= kMaxUnitSizeToPrint) {
Printf("Base64: ");
PrintFileAsBase64(Path);
OpenPOWER on IntegriCloud