mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:00:12 +01:00
Print the result to stdout even when trace_file is set. (#1406)
This commit is contained in:
+6
-3
@@ -77,9 +77,12 @@ static auto Main(llvm::StringRef default_prelude_file, int argc, char* argv[])
|
||||
// Typecheck and run the parsed program.
|
||||
CARBON_ASSIGN_OR_RETURN(int return_code,
|
||||
ExecProgram(&arena, ast, trace_stream));
|
||||
// Print the return code to stdout even when we aren't tracing.
|
||||
(trace_stream ? **trace_stream : llvm::outs())
|
||||
<< "result: " << return_code << "\n";
|
||||
// Always print the return code to stdout.
|
||||
llvm::outs() << "result: " << return_code << "\n";
|
||||
// When there's a dedicated trace file, print the return code to it too.
|
||||
if (scoped_trace_stream) {
|
||||
**trace_stream << "result: " << return_code << "\n";
|
||||
}
|
||||
return Success();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user