mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-27 22:02:33 +01:00
Fix fuzzer compile (#1193)
This commit is contained in:
@@ -20,14 +20,15 @@ void ParseAndExecute(const Fuzzing::CompilationUnit& compilation_unit) {
|
||||
|
||||
Arena arena;
|
||||
ErrorOr<AST> ast = ParseFromString(&arena, "Fuzzer.carbon", source,
|
||||
/*trace=*/false);
|
||||
/*parser_debug=*/false);
|
||||
if (!ast.ok()) {
|
||||
llvm::errs() << "Parsing failed: " << ast.error().message() << "\n";
|
||||
return;
|
||||
}
|
||||
AddPrelude("executable_semantics/data/prelude.carbon", &arena,
|
||||
&ast->declarations);
|
||||
const ErrorOr<int> result = ExecProgram(&arena, *ast, /*trace=*/false);
|
||||
const ErrorOr<int> result =
|
||||
ExecProgram(&arena, *ast, /*trace_stream=*/nullptr);
|
||||
if (!result.ok()) {
|
||||
llvm::errs() << "Execution failed: " << result.error().message() << "\n";
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user