mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-20 17:46:42 +00:00
Fix fuzzer compile (#1193)
This commit is contained in:
1 parent
9b028bb743
commit
55b0a0e016
1 file changed
+3
-2
@@ -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