clear progress indicator before printing errors

master
Andrew Kelley 2020-05-12 16:43:11 -04:00
parent 619159cf48
commit fda0eef9fb
1 changed files with 10 additions and 0 deletions

View File

@ -1794,6 +1794,16 @@ static LLVMValueRef ir_llvm_value(CodeGen *g, IrInstGen *instruction) {
}
void codegen_report_errors_and_exit(CodeGen *g) {
// Clear progress indicator before printing errors
if (g->sub_progress_node != nullptr) {
stage2_progress_end(g->sub_progress_node);
g->sub_progress_node = nullptr;
}
if (g->main_progress_node != nullptr) {
stage2_progress_end(g->main_progress_node);
g->main_progress_node = nullptr;
}
assert(g->errors.length != 0);
for (size_t i = 0; i < g->errors.length; i += 1) {
ErrorMsg *err = g->errors.at(i);