summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-isel-fuzzer/llvm-isel-fuzzer.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2017-10-12 01:57:49 +0000
committerJustin Bogner <mail@justinbogner.com>2017-10-12 01:57:49 +0000
commita5969ce15f79622b5c5ea399e05c4606fda99074 (patch)
treea8ee772f30565b2334c61086cd7367ed9de4e693 /llvm/tools/llvm-isel-fuzzer/llvm-isel-fuzzer.cpp
parentfd5b2a08069b6d1aca5c27e248dafe8abd585ef5 (diff)
downloadbcm5719-llvm-a5969ce15f79622b5c5ea399e05c4606fda99074.tar.gz
bcm5719-llvm-a5969ce15f79622b5c5ea399e05c4606fda99074.zip
llvm-isel-fuzzer: Handle a subset of backend flags in the executable name
Here we add a secondary option parser to llvm-isel-fuzzer (and provide it for use with other fuzzers). With this, you can copy the fuzzer to a name like llvm-isel-fuzzer:aarch64-gisel for a fuzzer that fuzzer AArch64 with GlobalISel enabled, or fuzzer:x86_64 to fuzz x86, with no flags required. This should be useful for running these in OSS-Fuzz. Note that this handrolls a subset of cl::opts to recognize, rather than embedding a complete command parser for argv[0]. If we find we really need the flexibility of handling arbitrary options at some point we can rethink this. llvm-svn: 315545
Diffstat (limited to 'llvm/tools/llvm-isel-fuzzer/llvm-isel-fuzzer.cpp')
-rw-r--r--llvm/tools/llvm-isel-fuzzer/llvm-isel-fuzzer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/tools/llvm-isel-fuzzer/llvm-isel-fuzzer.cpp b/llvm/tools/llvm-isel-fuzzer/llvm-isel-fuzzer.cpp
index 314acdb5087..164c85f9516 100644
--- a/llvm/tools/llvm-isel-fuzzer/llvm-isel-fuzzer.cpp
+++ b/llvm/tools/llvm-isel-fuzzer/llvm-isel-fuzzer.cpp
@@ -150,6 +150,7 @@ extern "C" LLVM_ATTRIBUTE_USED int LLVMFuzzerInitialize(int *argc,
InitializeAllAsmPrinters();
InitializeAllAsmParsers();
+ handleExecNameEncodedBEOpts(*argv[0]);
parseFuzzerCLOpts(*argc, *argv);
if (TargetTriple.empty()) {
OpenPOWER on IntegriCloud