Switch Driver back to parameters for construction (#4849)

This is for more complex construction, see #4846
This commit is contained in:
Jon Ross-Perkins
2025-01-27 23:48:44 +00:00
committed by GitHub
parent 8727445656
commit 0d0e202ce8
10 changed files with 36 additions and 45 deletions
+2 -6
View File
@@ -82,12 +82,8 @@ extern "C" auto LLVMFuzzerTestOneInput(const unsigned char* data, size_t size)
new llvm::vfs::InMemoryFileSystem;
RawStringOstream error_stream;
llvm::raw_null_ostream null_ostream;
Driver driver({.fs = fs,
.installation = install_paths,
.input_stream = nullptr,
.output_stream = &null_ostream,
.error_stream = &error_stream,
.fuzzing = true});
Driver driver(fs, install_paths, /*input_stream=*/nullptr, &null_ostream,
&error_stream, /*fuzzing=*/true);
if (!driver.RunCommand(args).success) {
auto str = error_stream.TakeStr();
if (llvm::StringRef(str).find("error:") == llvm::StringRef::npos) {