summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/fuzzer/FuzzerUtil.h
diff options
context:
space:
mode:
authorMatt Morehouse <mascasa@google.com>2017-12-04 19:25:59 +0000
committerMatt Morehouse <mascasa@google.com>2017-12-04 19:25:59 +0000
commit04304d129bbc6a63a7ff2051003e40ec9edbcb0f (patch)
treebee68f141877af7be7491074065b260c0292739d /compiler-rt/lib/fuzzer/FuzzerUtil.h
parentadf37517304a3a661a033c785cb6b502539db486 (diff)
downloadbcm5719-llvm-04304d129bbc6a63a7ff2051003e40ec9edbcb0f.tar.gz
bcm5719-llvm-04304d129bbc6a63a7ff2051003e40ec9edbcb0f.zip
[libFuzzer] Encapsulate commands in a class.
Summary: To be more portable (especially w.r.t. platforms without system()), commands should be managed programmatically rather than via string manipulation on the command line. This change introduces Fuzzer::Command, with methods to manage arguments and flags, set output options, and execute the command. Patch By: aarongreen Reviewers: kcc, morehouse Reviewed By: kcc, morehouse Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D40103 llvm-svn: 319680
Diffstat (limited to 'compiler-rt/lib/fuzzer/FuzzerUtil.h')
-rw-r--r--compiler-rt/lib/fuzzer/FuzzerUtil.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerUtil.h b/compiler-rt/lib/fuzzer/FuzzerUtil.h
index 6cebd7cd7d3..9a6227ea7da 100644
--- a/compiler-rt/lib/fuzzer/FuzzerUtil.h
+++ b/compiler-rt/lib/fuzzer/FuzzerUtil.h
@@ -13,6 +13,7 @@
#define LLVM_FUZZER_UTIL_H
#include "FuzzerDefs.h"
+#include "FuzzerCommand.h"
namespace fuzzer {
@@ -50,7 +51,7 @@ unsigned long GetPid();
size_t GetPeakRSSMb();
-int ExecuteCommand(const std::string &Command);
+int ExecuteCommand(const Command &Cmd);
FILE *OpenProcessPipe(const char *Command, const char *Mode);
OpenPOWER on IntegriCloud