From 6ec40b1040ace1a8fe1e60e4720025a41cea7890 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Tue, 17 Oct 2017 02:39:40 +0000 Subject: [PATCH] FuzzMutate: Fix arch parsing in FuzzerCLI The right way to parse arch names is by creating a triple. This was using getArchTypeForLLVMName before, which doesn't really do the right thing here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315965 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/FuzzMutate/FuzzerCLI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/FuzzMutate/FuzzerCLI.cpp b/lib/FuzzMutate/FuzzerCLI.cpp index a92b6c0930d..ef6958efa0b 100644 --- a/lib/FuzzMutate/FuzzerCLI.cpp +++ b/lib/FuzzMutate/FuzzerCLI.cpp @@ -47,7 +47,7 @@ void llvm::handleExecNameEncodedBEOpts(StringRef ExecName) { Args.push_back("-O0"); } else if (Opt.startswith("O")) { Args.push_back("-" + Opt.str()); - } else if (Triple::getArchTypeForLLVMName(Opt)) { + } else if (Triple(Opt).getArch()) { Args.push_back("-mtriple=" + Opt.str()); } else { errs() << ExecName << ": Unknown option: " << Opt << ".\n"; -- 2.40.0