mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Suppress Print intrinsic output in the fuzzer. (#2784)
Related to #2780, but mostly an issue when running over the committed corpus since we use Print a lot.
This commit is contained in:
@@ -86,8 +86,11 @@ auto ParseAndExecute(const Fuzzing::CompilationUnit& compilation_unit)
|
||||
AddPrelude(*prelude_path, &arena, &ast.declarations,
|
||||
&ast.num_prelude_declarations);
|
||||
TraceStream trace_stream;
|
||||
CARBON_ASSIGN_OR_RETURN(ast, AnalyzeProgram(&arena, ast, &trace_stream));
|
||||
return ExecProgram(&arena, ast, &trace_stream);
|
||||
|
||||
// Use llvm::nulls() to suppress output from the Print intrinsic.
|
||||
CARBON_ASSIGN_OR_RETURN(
|
||||
ast, AnalyzeProgram(&arena, ast, &trace_stream, &llvm::nulls()));
|
||||
return ExecProgram(&arena, ast, &trace_stream, &llvm::nulls());
|
||||
}
|
||||
|
||||
} // namespace Carbon
|
||||
|
||||
Reference in New Issue
Block a user