diff options
| author | kamil <kamil@NetBSD.org> | 2019-01-08 05:40:27 +0000 |
|---|---|---|
| committer | kamil <kamil@NetBSD.org> | 2019-01-08 05:40:27 +0000 |
| commit | ee754c2ddc45056ebbe84f5feb9563037464ceb0 (patch) | |
| tree | bc4c2937fe373cb5aba5675cbb793cc0f3a72604 /sys/external/bsd/compiler_rt/dist/lib/fuzzer/FuzzerUtilLinux.cpp | |
| parent | 2bb0f6fd62699c92ad398a6c9690e9b3b0ea3e1f (diff) | |
Import compiler-rt r350590. LLVM sanitizers on top of unmodified files from compiler-rt-259194.
Diffstat (limited to 'sys/external/bsd/compiler_rt/dist/lib/fuzzer/FuzzerUtilLinux.cpp')
| -rw-r--r-- | sys/external/bsd/compiler_rt/dist/lib/fuzzer/FuzzerUtilLinux.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sys/external/bsd/compiler_rt/dist/lib/fuzzer/FuzzerUtilLinux.cpp b/sys/external/bsd/compiler_rt/dist/lib/fuzzer/FuzzerUtilLinux.cpp new file mode 100644 index 00000000000..c103fd230b0 --- /dev/null +++ b/sys/external/bsd/compiler_rt/dist/lib/fuzzer/FuzzerUtilLinux.cpp @@ -0,0 +1,27 @@ +//===- FuzzerUtilLinux.cpp - Misc utils for Linux. ------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// Misc utils for Linux. +//===----------------------------------------------------------------------===// +#include "FuzzerDefs.h" +#if LIBFUZZER_LINUX || LIBFUZZER_NETBSD || LIBFUZZER_FREEBSD || \ + LIBFUZZER_OPENBSD +#include "FuzzerCommand.h" + +#include <stdlib.h> + +namespace fuzzer { + +int ExecuteCommand(const Command &Cmd) { + std::string CmdLine = Cmd.toString(); + return system(CmdLine.c_str()); +} + +} // namespace fuzzer + +#endif |
